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 2021-02-07 05:22:05
Processing time 0.0115 sec