Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:
Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files or .exe file, no reward will be given in any case.
The objective of this assignment is to provide hands on experience of:
You are required to write a simple “Temperature Conversion Calculator” using C++ language. The objective of this program should be to convert one temperature unit to other temperature units. These temperature units are Fahrenheit, Celsius and Kelvin etc.
The program should prompt the user to enter his/her option.
The program should respond in the following ways using switch statement:
After performing conversion operation, it should ask the user to continue or not. If user enters ‘n’ then it will quit the program otherwise it will perform the operation again
Sample output of program:
When user enters option C or c then it convert into Fahrenheit and Kelvin
When user enters option F or f then it convert into Celsius and Kelvin
When user enters option K or k then it convert into Celsius and Fahrenheit
Use the formulas given below for conversion.
K = °C + 273.15
°F = °C × 9⁄5 + 32
K = (°F + 459.67) × 5⁄9
just thanks to inform this
You are welcome
wi did it in B.Sc
bt in that time visual basic programe were used to run the programe
float Fahrenheit , Celsius , Kelvin;
cout"Please enter the temperature unit for which you want the convetsion \n";
cout"1. F for Fahrenheit to Celsius and Kelvin\n";
cout"2. C for Celsius to Fahrenhit and Kelvin \n";
cout"3. K for Celsius and Fahrenheit \n";
cout"\nPlease enter your option: ";
cout"Enter temperature in Fahrenhetit: ";
Celsius =(Fahrenheit -32.0)/1.8;
Kelvin = (Fahrenheit+459.67) * 5/9;
cout"Celsius = " Celsius;
cout"\nKelvin = "Kelvin;
cout"Enter temperature in Celsius: ";
Kelvin = Celsius + 273.15 ;
Fahrenheit = Celsius * 1.8 + 32;
cout"Fahrenheti = "Fahrenheit;
cout"\nKelvin = "Kelvin ;
cout"Enter temperature in Kelvin ";
Fahrenheit = ( Kelvin - 273.15)* 1.8 + 32;
Celsius = Kelvin - 273.15;
cout"Celsius = " Celsius;
cout"\nFahrenheti = "Fahrenheit;
cout"your choice is wrong !";
cout"\nDo you want to continue (y/n): ";
while(agn == 'Y' || agn == 'y');
Read more: CS201 Introduction to Programming Assignment No. 01 Solution and Discussion 2013 Due Date 25 Nov,2013 - Virtual University of Pakistan http://vustudents.ning.com/group/cs201introductiontoprogramming/for...
Read more at http://vustudents.ning.com/group/cs201introductiontoprogramming/for...