BUT2/DEV/DEV1.1/TP_Tableau/q1.c

17 lines
331 B
C
Raw Normal View History

2023-10-23 13:23:36 +02:00
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int position;
int tableau[10];
srand(time(NULL));
for (position=0;position<10;position++){
tableau[position]=((rand()%101)-50);
printf("%d",position);
printf(" --> ");
printf("%d\n",tableau[position]);
}
return EXIT_SUCCESS;
}