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