This code will convert Celsius to Fahrenheit, but it will not convert Fahrenheit to Celsius can any one help me its my first program really on my own. its a fairly simple Program but im 15yr old so gotta start somewhere
Code:#include <iostream> using namespace std; int main() { double far; double cel; int choice; do{ cout <<"1. Celsius to Fahrenheit.\n"<<"2. Fahrenheit to Celsius\n"<<"3. Exit\n"<<"Your choice ( 1-3 ): "; cin >>choice; switch (choice){ case 1: cout<<"Please Enter Degrees in Celsius: "; cin>>cel; far = ((9/5) * cel +32; cout<<"Degrees in Fahrenheit is: "<<far<<"\n"; break; case 2: cout<<"Please Enter Degrees in Fahrenheit: "; cin>>far; cel = (5/9) * (far-32); cout<<"Degrees in Celsius is: "<<cel<<"\n"; break; case 3: cout<<"Good bye\n"; exit; break; default: cout<<"Please Enter a Valid choice 1-3. Thank You."; break; } }while(choice !=3); system("Pause"); }