2024-09-17 17:22:13 +02:00
|
|
|
#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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}*/
|
2024-09-23 15:00:19 +02:00
|
|
|
|
|
|
|
int main(void){
|
|
|
|
|
|
|
|
}
|