#2
wp2319572012-11-02 15:30
|
程序代码:
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string friend_name = "JinMaoShiWang";
char friend_sex = 0;
while (1)
{
cout << "If your friend is a male please enter a 'm' \n"\
"else please enter a 'f'.\n";
cin >> friend_sex;
switch (friend_sex)
{
case 'm': cout << "If you see " << friend_name << " please ask him to call me.\n";
break;
case 'f': cout << "If you see " << friend_name << " please ask her to call me.\n";
break;
default: cout << "You sure your friend is a RENYAO?\n";
}
cout << endl;
}
return 0;
}
红色那个RENYAO怎么翻译?#include <string>
using namespace std;
int main(void)
{
string friend_name = "JinMaoShiWang";
char friend_sex = 0;
while (1)
{
cout << "If your friend is a male please enter a 'm' \n"\
"else please enter a 'f'.\n";
cin >> friend_sex;
switch (friend_sex)
{
case 'm': cout << "If you see " << friend_name << " please ask him to call me.\n";
break;
case 'f': cout << "If you see " << friend_name << " please ask her to call me.\n";
break;
default: cout << "You sure your friend is a RENYAO?\n";
}
cout << endl;
}
return 0;
}
[ 本帖最后由 有容就大 于 2012-11-2 14:49 编辑 ]