1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(){
int nombre1 = 0, nombretape = 0;
srand(time(0));
nombre = (rand() % 50);
printf("devinez le nombre\r\n");
while (1);
{ if (nombre1 < nombretape);
scanf("%d") &nombretape;
printf("vous ètes infèrieur\r\n");
else if (nombre1 == nombretape);
scanf("%d") &nombretape;
printf("vous avez trouvé bravo\r\n");
break;
else (nombre1 > nombretape);
scanf("%d") &nombretape;
printf("vous ètes supérieur\r\n");
}
system("PAUSE");
return 0;
} |
Partager