Advertisement
ricardorichsn

Sem2Nac1exer2

Aug 30th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include<stdlib.h>
  2. #include<stdio.h>
  3. #define o 2
  4.  
  5. int main()
  6. {
  7.     int l, c, m[o][o], aux=1;
  8.  
  9.     for(l=0; l<o ; l++)
  10.     {
  11.         for(c=0; c<o ; c++)
  12.         {
  13.             m[c][l]=aux;
  14.             //printf("%d\t", m[l][c]);
  15.             aux++;
  16.         }
  17.         //printf("\n");
  18.     }
  19.  
  20.     printf("\n");
  21.     for(l=0; l<o ; l++)
  22.     {
  23.         for(c=o-1; c>=0 ; c--)
  24.         {
  25.             printf("%d\t", m[l][c]);
  26.         }
  27.         printf("\n");
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement