Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 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;
  8. const int MAX = 100, MIN = 1;
  9. srand(time(NULL));
  10. x = (rand() % (MAX - MIN + 1)) + MIN;
  11. printf("Hello world!\n");
  12. do
  13. printf("Quel est le nombre:\n");
  14. scanf( "%d", &a );
  15. if ( x > a )
  16. {
  17. printf("C'est mois\n");
  18.  
  19. }
  20. else if ( x < a )
  21. {
  22. printf("C'est plus");
  23.  
  24. }
  25. else
  26. {
  27. printf("Bravo!");
  28.  
  29. }
  30. while x=a
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement