C++Primer Plus(第6版)中文版编程练习答案--第四章。程序是唐刀自己在学习的过程中自己编写的,其中可能存在错误和不足,大家当做参考就好。
cout<<"enteryourname:"<<endl;
getline(cin,name);
cout<<"enteryourfavouritedessert:"<<endl;
getline(cin,dessert);
cout<<"Ihavesomedelicious"<<dessert<<"foryou,"<<name<<endl;
}
3.
#include<iostream>
#include<string>
#include<cstring>
usingnamespacestd;
voidmain()
{
charfirst_name[20];
charlast_name[20];
cout<<"enteryourfirstname:"<<endl;
cin.getline(first_name,20);
cout<<"enteryourlastname:"<<endl;
cin.getline(last_name,20);
cout<<"hereistheinformationinasinglestring:"<<strcat(strcat(first_name,","),last_name)<<endl;}
4.
#include<iostream>
#include<string>
#include<cstring>
usingnamespacestd;
voidmain()
{
stringfirst_name;
stringlast_name;
cout<<"enteryourfirstname:"<<endl;
getline(cin,first_name);
C++Primer Plus(第6版)中文版编程练习答案--第六章_工学_高等教育_教育专区。C++Primer Plus(第6版)中文版编程练习答案--第六章。这些程序是唐刀在学习的时候...
C++Primer Plus(第6版)中文版编程练习答案--第五章_工学_高等教育_教育专区。C++Primer Plus(第6版)中文版编程练习答案--第五章。这些程序是唐刀在学习的时候...
} } // end namespace VECTOR //main.cpp #include <iostream> #include <fstream> #include <cstdlib> // rand(), srand() prototypes #include <...
《C++_Primer_Plus(第6版)中文版》编程练习1-10章_工学_高等教育_教育专区。《C++_Primer_Plus(第6版)中文版》编程练习1-10章...
C++PrimerPlus第四章编程练习C++PrimerPlus第四章编程练习隐藏>> 第四章编程练习 1、 #include <iostream> int main() { using namespace std; cout<<"What...
C++Primer Plus第六章编程练习_工学_高等教育_教育...='g') { cout<<"Please enter a c, p, t,... 2013年注会设计统考真题及答案104份文档 ...
C++ Primer Plus 第六版 第七章编程题答案_理学_高等教育_教育专区。C++ Primer Plus 第六版 第七章编程题答案//7.13.10 #include<iostream> double add(...
《C++ Primer Plus(第6版)中文版》编程练习1-5_计算机软件及应用_IT/计算机_专业资料。C++ Primer Plus(第6版)中文版编程练习1-5...
C++_Primer_Plus(第六版)前四章编程习题解答全_计算机软件及应用_IT/计算机_专业资料。C++_Primer_Plus(第六版)前四章编程习题解答全...
C++Primer Plus第五章编程练习_工学_高等教育_教育专区。C++Primer Plus第五章编程练习第五章编程练习 1、 #include <iostream> int main() { using namespace...
热门文档