Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C The Mars X Space Vehicles Company has been very successful. Due to an increase in demand for its STS's, the company had to

in C image text in transcribed
image text in transcribed
The Mars X Space Vehicles Company has been very successful. Due to an increase in demand for its STS's, the company had to hire thousands of scientists, engineers and staff from all over the world. As we all know, not all countries use the same system of measurements. The U.S., Liberia and Burma use the English system; while the rest of the world uses the metric system. In addition scientists use specific scales for some of their applications. To avoid confusion among team members from different countries, the company has commissioned the development and deployment of conversion applications. Your job is to write a program that interchangeably converts between different temperature scales (Celsius, Fahrenheit and Kelvin). Your job depends on the success of this application. Therefore, make sure you write clean code and test it thoroughly. Your program must do the following: 1. Display the menu below and get user input. Re-display the menu until the user enters 4. 1- Convert from Celsius 2. Convert from Fahrenheit 3. Convert from Kelvin 4- Quit Program 2. If the user enters 1, prompt the user to enter 3 numbers that represent temperatures expressed in degree Celsius. The program must then convert the temperatures to degree Fahrenheit and Kelvin and output them in a table as follows: Celsius -10.00 0.00 100.00 Fahrenheit 14.00 32.00 212.00 Kelvin 263.15 273.15 373.15 3. If the user enters 2, prompt the user to enter 3 numbers that represent temperatures expressed in degree Fahrenheit. The program should then convert the temperatures to degree Celsius and Kelvin and output them in a table as follows: Fahrenheit -10.00 0.00 100.00 Celsius -23.33 -17.78 37.78 Kelvin 249.82 255.37 310.93 4. If the user enters 3. prompt the user to enter 3 numbers that represent temperatures expressed in degree Kelvin (no negative numbers allowed, validate). The program should then convert the temperatures to degree Fahrenheit and Celsius and output them in a table as follows: Kelvin 0.00 100.00 1000.00 Fahrenheit -459.67 -279.67 1340.33 Celsius -273.15 -173.15 726.85 5. If the user enters 4, quit the program. Needed conversion formulas: From Celsius Celsius Fahrenhei To Fahrenheit Kelvin Celsius Formula F=C* (9.0/5.0) +32 K=C+273.15 C = (F-32) (5.0/9.0) Fahrenhei Kelvin K=(F+ 459.67) * (5.09.0) Kelvin Kelvin Fahrenheit Celsius F=K (9.0/5.0) - 459.67 C-K-273.15 Your program must comply with the following constraints: 1. Must declare at least the following 4 function prototypes: int getMenuSelection(); void convertFromCelsius); void convertFrom Fahrenheit( void convertFrom Kelvin(); /*Displays menu and gets user selection / /From Celsius to the other scales/ From Fahrenheit to the other scales / /*From Kelvin to the other scales/ 2. The main function must look exactly as shown below: int main() int menuSelection - 0; do system("cls"); menuSelection - getMenuSelection(); switch (menu Selection) case 1: convert FromCelsius(); break; case 2: convert FromFahrenheit(); break; case 3: convert Fromkelvin (): break; case 4: break; /*Do nothing. Exit Condition/ default: printf("Please enter a number between 1 and 4 "); while (menuSelection != 4); return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data In Just 7 Chapters

Authors: Prof Marcus Vinicius Pinto

1st Edition

B09NZ7ZX72, 979-8787954036

More Books

Students also viewed these Databases questions