Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /* 8. Preencha uma matriz de 10 linhas por 15 colunas com números aleatórios de 1000 a 2000. Em
- seguida exiba todo o seu conteúdo. */
- int main()
- {
- srand(time(NULL));
- int matriz[10][15],i,j,sorteado;
- for(i=0;i<10;i++)
- {
- for(j=0;j<15;j++)
- {
- matriz[i][j]= (rand()%1001)+1000;
- printf("%d ",matriz[i][j]);
- }
- printf("\n");
- }
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement