#include using namespace std;

int main(){ int level; cout'请选择游戏难度:\n1.简单\n2.普通\n3.困难\n'; cin>>level; switch(level){ case 1: cout'您选择了简单难度'<<endl; break; case 2: cout'您选择了普通难度'<<endl; break; case 3: cout'您选择了困难难度'<<endl; break; default: cout'您输入的难度有误,请重新输入!'<<endl; break; } return 0; }

C++ 代码示例:选择游戏难度

原文地址: https://www.cveoy.top/t/topic/nJRe 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录