APL/APL1.1/CM1/Feston.c

25 lines
405 B
C
Raw Normal View History

2021-11-16 14:55:36 +01:00
#include <stdio.h>
#include <stdlib.h>
2021-11-16 15:28:40 +01:00
#include <time.h>
2021-11-16 14:55:36 +01:00
int main(int argc, char * argv[]){
int matrice[10][20];
2021-11-16 15:28:40 +01:00
int i,j,x,k,l;
2021-11-16 14:55:36 +01:00
for (i=0;i<10;i++){
for(j=0;j<20;j++){
matrice[i][j]=1;
2021-11-16 15:09:30 +01:00
}
2021-11-16 14:55:36 +01:00
}
2021-11-16 15:28:40 +01:00
for (x=0;x<=20;x++){
srand(time(NULL));
matrice[rand()%10][rand()%20]=0;
2021-11-16 14:55:36 +01:00
}
for (i=0;i<10;i++){
for(j=0;j<20;j++){
2021-11-16 15:09:30 +01:00
printf("%d",matrice[i][j]);
2021-11-16 14:55:36 +01:00
}printf("\n");
}
printf("\n");
return EXIT_SUCCESS;
2021-11-16 15:34:15 +01:00
}