- 博客(8)
- 收藏
- 关注
原创 c++ primer plus第十章编程答案
//编程练习1 //BankCount.h #include <iostream> #include "BankCount.h" int main() { BankCount china = BankCount("mahuateng","5647895664335456",12546.30); china.show(); china.deposit(345....
2018-11-28 15:40:02
258
原创 c++ primer plus第九章编程答案
//编程练习1(多个文件) //golf.h const int Len = 40; struct golf { char fullname[Len]; int handicap; } ; void setgolf(golf & g ,const char *name ,int hc); int setgolf(golf & g); void handicap(...
2018-11-14 10:57:33
230
原创 c++ primer plus第八章编程答案
//编程练习1 (默认参数) #include <iostream> int print(char * ,int n = 0); using namespace std; int count = 0; int main() { print("xi"); print("xi",3); print("mm",3); return 0; } int ...
2018-11-11 21:53:55
502
原创 c++ primer plus第七章编程答案
//编程练习1 #include <iostream> double har_average(double ,double ); using namespace std; int main() { cout << "Enter two numbers:" << endl; double x,y; cin >> x >>...
2018-11-04 20:38:15
355
原创 c++ primer plus第六章编程答案
#include &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;iostream&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; #include &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;cctype&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; using namesp
2018-10-29 21:50:54
124
原创 c++ primer plus第五章编程答案
//编程练习1 #include &amp;amp;lt;iostream&amp;amp;gt; using namespace std; int main() { int num1,num2; cout &amp;amp;lt;&amp;amp;lt; &amp;quot;Please input the first number: &amp;quot;; cin &am
2018-10-24 21:55:43
377
原创 c++ primer plus第四章编程答案
//4.13 编程练习1 #include &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;iostream&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; using namespace std; int main() { char Firstname[20] ; char Lastname[20]; char grade; int age;
2018-10-19 17:35:08
302
2
原创 cin.get()和cin.getline()的区别
cin.get()和cin.getline()的区别 两者都是读取一行字符串 不同的是 cin.getline()函数 会丢弃换行符,但是会将它转为空字符’\0’,一般格式为cin.getline(array,size),array表示数组的变量名,size表示可以获取的字符数,如size=20,cin.getline()会从输入中读取19个字符,剩下的一个字符自动添加空字符。 cin.get(...
2018-10-11 21:46:28
4821
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人