是or不是遊戲

fushuxuan1發表於2024-05-04
#include <bits/stdc++.h>
#include <windows.h>
int main(int argc, char** argv){
	int a=10;
	 
	if(MessageBox(NULL,"你在心中想個數字,我來猜","是or不是遊戲",MB_OK)==IDOK){
		if(MessageBox(NULL,"是5及以內嗎","是or不是遊戲",MB_YESNO)==IDYES){
			if(MessageBox(NULL,"是'1'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}else if(MessageBox(NULL,"是'2'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}else if(MessageBox(NULL,"是'3'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}else if(MessageBox(NULL,"是'4'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}else if(MessageBox(NULL,"是'5'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}   
		}else{
			if(MessageBox(NULL,"是'6'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}
			else if(MessageBox(NULL,"是'7'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			} 
			else if(MessageBox(NULL,"是'8'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			} 
			else if(MessageBox(NULL,"是'9'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}else if(MessageBox(NULL,"是'10'嗎","是or不是遊戲",MB_YESNO)==IDYES){
				return 0;
			}  			
		}  
	}
	return 0;
}

  

相關文章