正在加载图片...
ooP/ Slide 27 Application of Temperature class Eating #include <iostream> Inforuraijon using namespace std; / definition of Temperature class goes here void main(i char respi Temperature tempi do i cout < Enter temperature (e.g/98.6 F):i temp.read()i cout temp. fahrenheit()<<Fahrenheit/<< endl; cout < temp celsius()<<Celsius"<< endli cout endl < endl cout Another temperature to convert?i cin > respi ) while(resp I resp =OOP / Slide 27 #include <iostream> using namespace std; // definition of Temperature class goes here void main(){ char resp; Temperature temp; do{ cout << "Enter temperature (e.g., 98.6 F): "; temp.read(); cout << temp.fahrenheit() << “Fahrenheit” << endl; cout << temp.celsius() << “Celsius” << endl; cout << endl << endl; cout << "Another temperature to convert? "; cin >> resp; }while(resp == 'y' || resp == 'Y'); } Application of Temperature class
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有