Skip to content
Snippets Groups Projects

makefile et autres

Open LEPPERT MICHAEL requested to merge mleppert/P4z:master into master
Compare and
12 files
+ 226
0
Preferences
Compare changes
Files
12
+ 29
0
 
#include "function.h"
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <time.h>
 
 
void afficheTab(long tabAAffiche[], size_t tabTaille){
 
printf("[ ");
 
for(size_t i=0; i<tabTaille; i++){
 
if(i==tabTaille-1){
 
printf("%ld", tabAAffiche[i]);
 
}
 
else{
 
printf("%ld, ", tabAAffiche[i]);
 
}
 
}
 
printf(" ]\n");
 
}
 
 
void genTabAlea(long tabARemplir[], size_t tailleTab) {
 
int rand_is_seeded = 0;
 
if(!rand_is_seeded)
 
{
 
srand(time(NULL));
 
rand_is_seeded = 1;
 
}
 
for(size_t i=0; i<tailleTab; i++){
 
tabARemplir[i]=rand()%(10);
 
}
 
}