#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; }
标签:MessageBox,return,游戏,MB,不是,IDYES,NULL,YESNO From: https://www.cnblogs.com/fushuxuan/p/18172019