Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

숙제1/최경현

From ZeroWiki

소스

#include <iostream>

using namespace std;

long convert(long celsius);

int main()
{
	long celsius;
	
	cout << "섭씨 온도를 입력하고 Enter 키를 누르십시오 : ";
	cin >> celsius;
	cout <<"섭씨 "<<celsius<<"도는 화씨로 "<<convert(celsius)<<"도 입니다.";

	return 0;
}

long convert(long celsius)
{
	long fahrenheit;

	fahrenheit = fahrenheit = 1.8 * celsius + 32.0;

	return fahrenheit;
}

05학번만의C++Study/숙제제출