Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main (void)
- {
- int input,essais,alea;
- srand( (unsigned)time( NULL ) );
- alea = rand()%100000000000000000000000000000000000000000000000000000000;
- while( input != alea ) {
- printf( "Entrer un nombre\n");
- scanf("%d", &input );
- essais = essais + 1;
- //cette partie regarde si le nombre d'essais max a été atteint
- if (essais > 901)
- {
- printf("t'as perdu gros fils de pute de ta mere, le nombre c'etait %d\n", alea);
- system("pause");
- }
- //cette partie dis si le chiffre est trop grand ou petit
- if (input != alea )
- {
- printf("non, le resultat est ");
- if (input > alea )
- {
- printf("plus petit\n");
- }
- else
- {
- printf("plus grand\n");
- }
- }
- }
- printf( "bravo vous avez trouve avec %d essais", essais);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement