Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int i,ans,num;
- printf("Ans: ");
- scanf("%d",&ans);
- for(i = 0; i < 10; i++){
- scanf("%d",&num);
- if(num==ans){
- printf("=Victory\n");
- return 0;
- }
- else if(num>ans-4&&num<ans+4){
- printf("=Very Close\n");
- }
- else if(num>ans){
- printf("=Too large\n");
- }
- else {
- printf("=Too small\n");
- }
- }
- printf("Game over\n");
- return 0;
- }
Add Comment
Please, Sign In to add comment