Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<time.h>
- #define N 500
- int main(){
- int i,j,faixa,m[N][N],l,c;
- srand(time(NULL));
- printf("Quantas linhas tera sua matriz?\n");
- scanf("%d",&l);
- printf("E,quantas colunas?\n");
- scanf("%d",&c);
- printf("Por favor,qual a faixa do sorteio?\n");
- scanf("%d",&faixa);
- printf("Pronto,ai esta sua matriz:\n");
- for(i=0;i<l;i++){
- printf("\n");
- for(j=0;j<c;j++){
- printf(" ");
- m[i][j]=(rand()%faixa)+100;
- printf("%.0d",m[i][j]);
- }
- }
- printf("\n\n\nbacana neh!!!\n\n\n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment