Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int ans=0;
- do{
- printf("1-play game\n");
- printf("2-save game\n");
- printf("3-exit game\n");
- printf("please choose 1,2,3: ");
- scanf("%d",&ans);
- switch(ans){
- case 1: printf("playing game!...\n\n"); break;
- case 2: printf("saving game!...\n\n");break;
- case 3: return 0;
- default: printf("wrong input, please enter 1, 2, 3 only!!!\n\n\n"); break;
- }
- }while(1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement