《c primerplus中文第六版第二章编程练习1》由会员分享,可在线阅读,更多相关《c primerplus中文第六版第二章编程练习1(2页珍藏版)》请在金锄头文库上搜索。
/ practice.cpp : 定义控制台应用程序的入口点。 /#include “stdafx.h“ #include /double change_tem(double x); void display(int x,int y); int main() using namespace std; /* 1 cout distance; cout Celsius; Fahrenheit = change_tem(Celsius); cout hours; cout minutes; cout endl; display(hours,minutes); cin.get(); cin.get(); return 0;/*5 double change_tem(double x) double y; y = 1.8 * x + 32.0; return y; */7 void display(int x,int y) using namespace std; cout “Time: “ x “:“ y endl; return;