30 lines
621 B
C++
30 lines
621 B
C++
|
// 输入0,1,2三个数值,分别代表玩家的角色,0代表`亚索`、1代表`盲僧`、2代表`提莫`,输出“您选择的角色为 xxx”。
|
|||
|
#include <iostream>
|
|||
|
|
|||
|
using namespace std;
|
|||
|
|
|||
|
int main()
|
|||
|
{
|
|||
|
short n;
|
|||
|
cout << "请选择角色: 0-亚索, 1-盲僧, 2-提莫";
|
|||
|
cin >> n;
|
|||
|
cout << "您选择的角色为: ";
|
|||
|
switch (n)
|
|||
|
{
|
|||
|
|
|||
|
default:
|
|||
|
cout << "选择错误";
|
|||
|
break;
|
|||
|
case 0:
|
|||
|
cout << "亚索";
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
cout << "盲僧";
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
cout << "提莫";
|
|||
|
break;
|
|||
|
}
|
|||
|
cout << endl;
|
|||
|
return 0;
|
|||
|
}
|