소스

~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;
}
Retrieved from http://wiki.zeropage.org/wiki.php/05학번만의C++Study/숙제제출1/허아영
last modified 2021-02-07 05:22:05