c++primerplus(第六版)课后编程练习答案.doc

cprimerplus(第六版)课后编程练习答案

第二章:开始学习C++ //ex2.1--display your name and address #includeiostream int main(void) { using namespace std; coutMy name is liao chunguang and I live in hunan chenzhou.\n”; } //ex2.2--convert the furlong units to yard uints-把浪单位换位码单位 #includeiostream double fur2yd(double); int main() { using namespace std; coutenter the distance measured by furlong units:; double fur; cinfur; coutconvert the furlong to yardendl; double yd; yd=fur2yd(fur); coutfur furlong is yd yardendl; return 0; } double fur2yd(double t) { return 220*t; } //ex2.3-每个函数都被调用两次 #includeiostream void mice(); void see(); us

文档评论(0)

1亿VIP精品文档

相关文档