Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n;
- printf("Enter a number (between 1 and 10):");
- scanf("%d",&n);
- while(n!=5)
- {
- if(n<5) printf("Too low! Try again!\n");
- else printf("Too high! Try again!\n");
- printf("\nEnter a number (between 1 and 10):");
- scanf("%d",&n);
- }
- printf("\nCongratulations! You guessed it!");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement