Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Game: Random number

al-popov94 Feb 19th, 2012 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* al.popov94@gmail.com */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. main()
  7. {
  8.     int num, ent; /* num - random number, ent - enter number */
  9.  
  10.     printf("Game: Random number!\n");
  11.  
  12.     while(num != ent) {
  13.     printf("\nTry again.\n");
  14.     num = rand()%10;
  15.     /* printf("\n# Cheate - %d #\n", num); */
  16.     printf("Enter number: ");
  17.     scanf("%d", &ent);
  18.     }
  19.  
  20.     printf("Congratulate! You have guessed.\n");
  21.     return 0;
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top