الصفحة الرئيسيةc plus plus c++ Program for Temperature Conversion يونيو 20, 2021 0 // 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 << "\n Temp. conversation menu : "; cout << "\n 1. farenhit to celsius."; cout << "\n 2. celsius to farenhit."; cout << "\n Enter your choice : "; cin >> choice; if(choice == 1) { cout << "\n Enter temp. in farenheit : "; cin >> temp; cnvtemp = (temp-32) / 1.8; cout << "\n The temp in celsius is = " << cnvtemp; } else { cout << "\n Enter temp in celsius : "; cin >> temp; cnvtemp = (1.8 * temp) + 32; cout << "\n The temp in farenhit is = " << cnvtemp; } } Tags: c plus plus programming-examples Facebook Twitter