목차
없음
본문내용
using std::cin;
using std::endl;
using std::setprecision;
using std::setiosflags;
void change_ctof(double a);
void change_ftoc(double b);
void change_ctof(double a)
{
double temp1;
temp1 = (9.00 / 5.00) * a + 32.00;
cout << setprecision (2)<< setiosflags( ios::fixed | ios::showpoint ) << a
<< " --> "
<
}
void change_ftoc(double b)
{
double temp2;
temp2 = (b - 32.00) * (5.00 / 9.00);
cout << setprecision (2)<< setiosflags( ios::fixed | ios::showpoint ) << b
<< " --> "
<
}
int main()
{
int choice, loop;
double in1, in2;
for(loop=1 ; loop<=5 ; ++loop)
{
cout << endl;
cout << endl;
cout << "========== Menu ==========\n";
cout << "0. Program END\n";
cout << "1. celsius -> fahrenheit\n";
cout << "2. fahrenheit -> celsius\n";
cout << "==========================\n\n";
cout << "choice the number: ";
cin >> choice;
cout << endl;
if(choice==0)
break;
using std::endl;
using std::setprecision;
using std::setiosflags;
void change_ctof(double a);
void change_ftoc(double b);
void change_ctof(double a)
{
double temp1;
temp1 = (9.00 / 5.00) * a + 32.00;
cout << setprecision (2)<< setiosflags( ios::fixed | ios::showpoint ) << a
<< " --> "
<
void change_ftoc(double b)
{
double temp2;
temp2 = (b - 32.00) * (5.00 / 9.00);
cout << setprecision (2)<< setiosflags( ios::fixed | ios::showpoint ) << b
<< " --> "
<
int main()
{
int choice, loop;
double in1, in2;
for(loop=1 ; loop<=5 ; ++loop)
{
cout << endl;
cout << endl;
cout << "========== Menu ==========\n";
cout << "0. Program END\n";
cout << "1. celsius -> fahrenheit\n";
cout << "2. fahrenheit -> celsius\n";
cout << "==========================\n\n";
cout << "choice the number: ";
cin >> choice;
cout << endl;
if(choice==0)
break;
소개글