|
@ -28,24 +28,23 @@ int main() { |
|
|
Menu(); |
|
|
Menu(); |
|
|
cin >> input; |
|
|
cin >> input; |
|
|
|
|
|
|
|
|
if (input == 3) { |
|
|
while (input != 3) { |
|
|
cout << "Quitting..." << endl; |
|
|
|
|
|
|
|
|
if (input == 1) { |
|
|
|
|
|
cout << "Enter temperature in Celsius: "; |
|
|
|
|
|
cin >> input; |
|
|
|
|
|
C = input; |
|
|
|
|
|
cout << convertF(C, F) << endl; |
|
|
|
|
|
break; |
|
|
|
|
|
} else if (input == 2) { |
|
|
|
|
|
cout << "Enter temperature in Fahrenheit: "; |
|
|
|
|
|
cin >> input; |
|
|
|
|
|
F = input; |
|
|
|
|
|
cout << convertC(C, F); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
cout << "\nExiting..."; |
|
|
else if (input == 1){ |
|
|
|
|
|
cout << "Enter temperature in Celsius: "; |
|
|
|
|
|
cin >> input; |
|
|
|
|
|
C = input; |
|
|
|
|
|
cout << convertF( C, F) << endl; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else if (input == 2){ |
|
|
|
|
|
cout << "Enter temperature in Fahrenheit: "; |
|
|
|
|
|
cin >> input; |
|
|
|
|
|
F = input; |
|
|
|
|
|
cout << convertC(C, F); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return(0); |
|
|
return(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|