问题及代码:
输入一个自己喜欢的 英雄的名字,得到他的登场台词。
输入:你喜欢的英雄的名字,本代码以德莱文为例。
程序输出:他的台词。
#include<iostream>
#include<string>
using namespace std;
int main()
{
string a;
cout<<"要选择的英雄";
cin>>a;
if(a=="Draven")
cout<<"Welcon to the League of Draven"<<endl;
return 0;
}
运行结果:<img src="https://img-blog.youkuaiyun.com/20150907172714516" alt="" />