Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rotación matriz anti horaria
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#include <stdio.h> int main () { unsigned int M,N; unsigned int angulo; unsigned int i,j,k,l; unsigned int vueltas; scanf("%u %u",&M,&N); scanf("%u",&angulo); unsigned int matriz[M][N]; unsigned int aux[N][M]; for (i = 0; i < M ; i++) { for (j = 0 ; j < N ; j++) { scanf("%u",&matriz[i][j]); } } if ((angulo % 90) == 0) { vueltas = angulo / 90; for (i = 0; i < vueltas ; i++) { l = M; for (j = 0 ; j < N ; j++) { for (k = 0 ; k < M ; k++) { aux[j][k] = matriz[k][l]; } l = l - 1; } } } else{ printf("Angulo no valido"); } if ((angulo % 90) == 0) { for (i = 0 ; i < N ; i++) { for (j = 0; j < M ; j++) { printf("%u ",aux[i][j]); } printf("\n"); } } return 0; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion