28 lines
370 B
C
28 lines
370 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;
|
|
}
|
|
for(i=0;i<10;i++){
|
|
printf("%d, ",tab[i]);
|
|
}
|
|
printf("\n");
|
|
|
|
int tabM[10];
|
|
for(i=0;i<10;i++){
|
|
tabM[i] = tab[9-i];
|
|
}
|
|
|
|
for(i=0;i<10;i++){
|
|
printf("%d, ",tabM[i]);
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|