Ajout des TP
This commit is contained in:
13
BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/repetition.c
Normal file
13
BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/repetition.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int repetition(long tab[], int taille){
|
||||
int i;
|
||||
for(i=0;i<taille-1;i++){
|
||||
if(tab[i]!=tab[i+1]){
|
||||
return 0; /*False*/
|
||||
}
|
||||
}
|
||||
return 1; /*True*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user