U E D R , A S I H C RSS

05학번만의C++Study/숙제제출1/허아영

소스

~cpp
#include <iostream>
using namespace std;

float calculation(float celsius);

void main()
{
	float celsius, fahrenheit;
	cout << "섭씨 온도를 입력하고 Enter 키를 누르십시오 : ";
	cin >> celsius;
	fahrenheit = calculation(celsius);
	cout << "섭씨" << celsius << "도는 화씨로 " << fahrenheit << "도입니다." << endl;
}

float calculation(float celsius)
{
	float fahrenheit = 0;
	fahrenheit = celsius * 1.8 + 32.0;
	return fahrenheit;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 1.8088 sec