第二章:开始学习 C++//ex2。1——display your name and address#include〈iostream〉int main(void){using namespace std;cout〈〈"My name is liao chunguang and I live in hunan chenzhou。\n”;}//ex2。2-—convert the furlong units to yard uints-把浪单位换位码单位#include〈iostream>double fur2yd(double);int main(){using namespace std;cout〈〈"enter the distance measured by furlong units:";double fur;cin〉>fur;cout〈<”convert the furlong to yard"〈
>age; int month; month=age*12; cout<〈age<〈” years is "<〈month<〈" months"<double C2F(double);int main(){using namespace std;cout〈〈"please enter a Celsius value:”;double C;cin〉〉C;double F;F=C2F(C);cout<〈C<<" degrees Celsius is ”<〈F<〈" degrees Fahrenheit。”<double convert(double);//函数原型int main(){using namespace std;cout〈〈”Enter the number of light years:”;double light_years;cin〉〉light_years;double astro_units;astro_units=convert(light_years);cout〈〈light_years<<” light_years = "<