Here is the code.. #include <iostream> main() { double f_temp, k_temp, c_temp, temp; char ch, quit; std::cout << ' *********** Temprature Conversion Calculator **************'; std::cout << 'nn Please enter the temprature unit for which you want the coverison '; std::cout << 'n 1. F for Fahrenheit to Celcius and Kalvin'; std::cout << 'n 2. C for Celsius to Fahrenheit and Kalvin'; std::cout << 'n 3. K for Kalvin to Fahrenheit and Celcius'; startagain: std::cout << 'nn Please enter you choice: '; std::cin >> ch; switch(ch) { case 'f': case 'F': std::cout << ' Please enter temprature in Farhenheit: '; std::cin >> f_temp; c_temp = (f_temp - 32) * 5/9; k_temp = (f_temp + 459.67) * 5/9; std::cout << ' Celcius =' << c_temp; std::cout << 'n Kelvin =' << k_temp; std::cout << 'n Do you want to calculate another value (y/n): '; std::cin >> quit; if (quit 'y' || quit 'Y') goto startagain; break; case 'c': case 'C': std::cout << ' Please enter temprature in Celcius: '; std::cin >> c_temp; k_temp = c_temp + 273.15 ; f_temp = c_temp * 9/5 + 32; std::cout << ' Kelvin =' << k_temp; std::cout << 'n Farhenheit =' << f_temp; std::cout << 'n Do you want to calculate another value (y/n): '; std::cin >> quit; if (quit 'y' || quit 'Y') goto startagain; break; case 'k': case 'K': std::cout << ' Please enter temprature in Kelvin: '; std::cin >> k_temp; c_temp = k_temp - 273.15 ; f_temp = (k_temp - 273.14) * 9/5 + 32; std::cout << ' Celcius =' << c_temp; std::cout << 'n Farhenheit =' << f_temp; std::cout << 'n Do you want to calcute another value (y/n): '; std::cin >> quit; if (quit 'y' || quit 'Y') goto startagain; break; default: std::cout << 'n Invalid Choice'; } std::cout << endl<<endl; system('pause'); }
Cout Was Not Declared In This Scope In Dev C Youtube
May 29, 2014 E faremo conoscenza con il 'signor' cout;) Il video contiene solo la registrazione con il mio commento audio (senza altri video, immagini o audio) di una sessione di lavoro con software.