Skip to content
Snippets Groups Projects

makefile et autres

Open LEPPERT MICHAEL requested to merge mleppert/P4z:master into master
Compare and Show latest version
26 files
+ 558
18
Preferences
Compare changes
Files
26
TP1/function.c 0 → 100644
+ 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);
 
}
 
}