int askName1() //Exercise1.5-1
{
char usr_name[200]="";
cout << "Please write your name : ";
cin >> usr_name;
if (strlen(usr_name) < 2)
{
cout << "Your input is invalid !Please do it again!";
askName1();
}
else
{
cout << "Congratulations!";
}
return 0;
}
int askName2() //Exercise1.5-2
{
string usr_name;
cout << "Please write your name : ";
cin >> usr_name;
【C++学习】【阶段一】Essential C++ 第一章习题答案
本文提供了C++入门学习者在Essential C++第一章中的习题详细解答,涵盖了基本语法和概念的应用。
摘要由CSDN通过智能技术生成