27 lines
392 B
C
27 lines
392 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <time.h>
|
||
|
int main(void){
|
||
|
srand(time(0));
|
||
|
int tab[10];
|
||
|
int i;
|
||
|
for(i=0;i<10;i++){
|
||
|
tab[i]=(rand()%(50+1-(-50)))-50;
|
||
|
}
|
||
|
|
||
|
printf("+");
|
||
|
for(i=0;i<10;i++){
|
||
|
printf("-----+");
|
||
|
}
|
||
|
printf("\n");
|
||
|
for(i=0;i<10;i++){
|
||
|
printf("|%3d, ",tab[i]);
|
||
|
}
|
||
|
|
||
|
printf("|\n+");
|
||
|
for(i=0;i<10;i++){
|
||
|
printf("-----+");
|
||
|
}
|
||
|
printf("\n");
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|