Advertisement
fellpz

Construindo uma matriz

Apr 5th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. # include <stdio.h>
  2. int main()
  3. {
  4. int t, i, M[3][4];
  5. for (t=0; t<3; ++t)
  6. for (i=0; i<4; ++i)
  7. M[t][i] = (t*4)+i+1;
  8. for (t=0; t<3; ++t)
  9. {
  10. for (i=0; i<4; ++i)
  11. printf ("%3d ", M[t][i]);
  12. printf ("\n");
  13. }
  14. return(0);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement