nikolas_serafini

Lista 5 - Exercício 8

Jul 6th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main()
  5. {
  6.   int i,j,matrix[10][15];  
  7.  
  8.   srand(time(NULL));
  9.  
  10.   for (i = 0; i < 10; i++) {
  11.     for (j = 0; j < 15; j++)
  12.         matrix[i][j] = rand() % 1000 + 1001;
  13.   }
  14.    
  15.   for (i = 0; i < 10; i++) {
  16.     for (j = 0; j < 15; j++) {
  17.       printf("%d ",matrix[i][j]);
  18.     }
  19.     printf("\n");
  20.   }
  21.      
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment