37 lines
769 B
C
37 lines
769 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
/*1)
|
||
|
int main (void){
|
||
|
int chance;
|
||
|
int tentative = 5;
|
||
|
int entrer = 0;
|
||
|
int x = 24;
|
||
|
|
||
|
printf("entrer un nobre entre 1 et 100 vous aurez 5 essaie pour trouver :");
|
||
|
|
||
|
for (chance = 0; chance < 5; chance++){
|
||
|
|
||
|
tentative--;
|
||
|
scanf("%d", &entrer);
|
||
|
|
||
|
if (entrer > x){
|
||
|
|
||
|
printf("c'est - il vous reste ");
|
||
|
printf("%d",tentative);
|
||
|
printf(" chance\n");
|
||
|
|
||
|
}else if(entrer < x){
|
||
|
|
||
|
printf("c'est + il vous reste ");
|
||
|
printf("%d",tentative);
|
||
|
printf(" chance\n");
|
||
|
|
||
|
}else if( entrer == x){
|
||
|
|
||
|
printf("felicitation vous avez deviner le numero secret\n");
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|
||
|
}
|
||
|
}*/
|