输入数字1-3切换选择菜单
// variable.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int nMenuStates = 0;
cout << "请输入数字1-3切换菜单:" << endl;
cin >> nMenuStates;
cout << "■■■■■■■■■■■■■■■■■■■■" << endl;
cout << "■■■■■■■■■■■■■■■■■■■■" << endl;
if (nMenuStates == 1)
{
cout << "■■■ ->游戏开始 ■■■" << endl;
cout << "■■■ 游戏设置 ■■■" << endl;
cout << "■■■ 游戏退出 ■■■" << endl;
}
else if (nMenuStates == 2)
{
cout << "■■■ 游戏开始 ■■■" << endl;
cout << "■■■ ->游戏设置 ■■■" << endl;
cout << "■■■ 游戏退出 ■■■" << endl;
}
else if (nMenuStates == 3)
{
cout << "■■■ 游戏退出 ■■■" << endl;
cout << "■■■ 游戏设置 ■■■" << endl;
cout << "■■■ ->游戏退出 ■■■" << endl;
}
else
{
cout << "输入不合法" << endl;
}
cout << "■■■■■■■■■■■■■■■■■■■■" << endl;
cout << "■■■■■■■■■■■■■■■■■■■■" << endl;
system("pause");
return 0;
}