Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main()
  6. {
  7. int x,a,i;
  8.  
  9. const int MAX = 100, MIN = 1;
  10. srand(time(NULL));
  11. x = (rand() % (MAX - MIN + 1)) + MIN;
  12. i==0;
  13. printf("Hello world!\n");
  14. do
  15. i=i+1;
  16. printf("Quel est le nombre:\n");
  17. scanf( "%d", &a );
  18. if ( x > a );
  19. {
  20. printf("C'est moins\n");
  21.  
  22. }
  23. else if ( x < a );
  24. {
  25. printf("C'est plus");
  26.  
  27. }
  28. else
  29. {
  30. printf("Bravo!");
  31.  
  32. }
  33. while x=a && i=10;
  34. }
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement