purpose: the purpose of this program is to let the user convert temp from the given to celsius, fahrenheit, or kelvin. Ensure valid selection made and temperature within range. Option to repeat program.
Link to my project: https://replit.com/@AmanGrewal/GrewalAmantemp-conversion#main.cpp
main_temperature.cpp | |
File Size: | 5 kb |
File Type: | cpp |
Sample Run:
sh -c make -s
./main
welcome to Temperature Converter
Can you please enter your name?: Vicki
Thankyou
If you would ike to convert from celsuis to fahrenheit please press 1
if you would like to convert from fahrenheit to celsuis please press 2
if you would like to convert from celsius to kelvin please press 3
if you would like to convert from kelvin to celsius please press 4
if you would like to convert from kelvin to fahrenheit please press 5
if you would like to convert from fahrenheit to kelvin please press 6
enter your choice: 0
Invaild Input. Try again!
7
Invaild Input. Try again!
1
please enter a temperature between -273 and 100 celsius
Please enter the temperature you would like to convert from celsuis to fahrenheit!-275
Invalid Input. try again101
Invalid Input. try again86
86 celsuis is 186.8 fahrenheit
To repeat y-yes, n-no. Enter choice: m
Invaild Input. Try again!
To repeat y-yes, n-no. Enter choice: y
welcome to Temperature Converter
Can you please enter your name?: Vicki
Thankyou
If you would ike to convert from celsuis to fahrenheit please press 1
if you would like to convert from fahrenheit to celsuis please press 2
if you would like to convert from celsius to kelvin please press 3
if you would like to convert from kelvin to celsius please press 4
if you would like to convert from kelvin to fahrenheit please press 5
if you would like to convert from fahrenheit to kelvin please press 6
enter your choice: 2
please enter a temperature between -459 and 212 fahrenheit
Please enter the temperature you would like to convert from fahrenheit to celsuis!
./main
welcome to Temperature Converter
Can you please enter your name?: Vicki
Thankyou
If you would ike to convert from celsuis to fahrenheit please press 1
if you would like to convert from fahrenheit to celsuis please press 2
if you would like to convert from celsius to kelvin please press 3
if you would like to convert from kelvin to celsius please press 4
if you would like to convert from kelvin to fahrenheit please press 5
if you would like to convert from fahrenheit to kelvin please press 6
enter your choice: 0
Invaild Input. Try again!
7
Invaild Input. Try again!
1
please enter a temperature between -273 and 100 celsius
Please enter the temperature you would like to convert from celsuis to fahrenheit!-275
Invalid Input. try again101
Invalid Input. try again86
86 celsuis is 186.8 fahrenheit
To repeat y-yes, n-no. Enter choice: m
Invaild Input. Try again!
To repeat y-yes, n-no. Enter choice: y
welcome to Temperature Converter
Can you please enter your name?: Vicki
Thankyou
If you would ike to convert from celsuis to fahrenheit please press 1
if you would like to convert from fahrenheit to celsuis please press 2
if you would like to convert from celsius to kelvin please press 3
if you would like to convert from kelvin to celsius please press 4
if you would like to convert from kelvin to fahrenheit please press 5
if you would like to convert from fahrenheit to kelvin please press 6
enter your choice: 2
please enter a temperature between -459 and 212 fahrenheit
Please enter the temperature you would like to convert from fahrenheit to celsuis!