U E D R , A S I H C RSS

05학번만의C Study/숙제제출1/이형노

소스

~cpp
#include<iostream>

using namespace std;

float tofah(float );

int main()
{
	float cel;		//섭씨온도
	float fah;		//화씨온도
	
	cout << "섭씨 온도를 입력하고 Enter 키를 누르십시오 : " ;
	cin >> cel;
	
	fah=tofah(cel);

	cout << "섭씨 " << cel << "도는 화씨로 " << fah << "도 입니다." << endl;
	return 0;
}

float tofah(float cel)
{
	return (1.8 * cel) + 32.0;
}

음... 저 fah 라는 변수... 쓸데 없는건가?? 고민되네...ㅋㅋ -- (laciel)형노

----05학번만의C++Study 05학번만의C++Study/숙제제출
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:04
Processing time 0.0163 sec