c++ Program for Temperature Conversion 2022-09-28 // Program to find Maximum of Three Numbers // using ElseIf ladder and Logical Operator. #include using namespace std; int main() { int choice; float temp, cnvtemp; cout << " Temp. conversation menu : "; cout << " 1. farenhit to celsius."; cout << " 2. celsius to farenhit."; cout << " Enter your choice : "; cin >> choice; if(choice == 1) { cout << " Enter temp. in farenheit : "; cin >> temp; cnvtemp = (temp-32) / 1.8; cout << " The temp in celsius is = " << cnvtemp; } else { cout << " Enter temp in celsius : "; cin >> temp; cnvtemp = (1.8 * temp) + 32; cout << " The temp in farenhit is = " << cnvtemp; } } Twitter WhatsApp Telegram Facebook