Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rotación matriz anti horaria
#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; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Michael Bean's Spring 2017 Lab 3 v1
Smartprix coding
StructSurvey
B_141104_TresPuntosTriangulo
PtStrCpy
C141105_SwitchNotas
Présentation
swap_bitwise.c
prime or not
Done I think
Please log in to post a comment.