28 lines
421 B
C
28 lines
421 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <time.h>
|
||
|
#define TAILLETAB 20
|
||
|
|
||
|
int main (void){
|
||
|
|
||
|
int tab[TAILLETAB];
|
||
|
int i,r;
|
||
|
|
||
|
srand(time(NULL));
|
||
|
|
||
|
/* ajoute TAILLETAB valeurs dans un tableau entre 0 et 20 */
|
||
|
|
||
|
for(i=0; i<TAILLETAB; i++){
|
||
|
tab[i]=rand()%21;
|
||
|
/*printf("%d\n", tab[i]);*/ /*pour vérifier*/
|
||
|
}
|
||
|
|
||
|
for(i=0; i<TAILLETAB; i++){
|
||
|
for(r=0; r<tab[i]; r++){
|
||
|
printf("▄");
|
||
|
}
|
||
|
printf("\n");
|
||
|
}
|
||
|
|
||
|
}
|