Advertisement
cd62131

Assign Matrix

Mar 14th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(void) {
  3.   int mat[5][10], i, j, val = 50;
  4.   for (i = 5 - 1; i >= 0; i--)
  5.     for (j = 10 - 1; j >= 0; j--)
  6.       mat[i][j] = val--;
  7.   for (i = 0; i < 5; i++) {
  8.     for (j = 0; j < 10; j++)
  9.       printf("%2d ", mat[i][j]);
  10.     puts("");
  11.   }
  12.   return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement