Question: Draw the flowchart and write a C program for the following system that checks the levels of gas A, gas B and gas C. The

Draw the flowchart and write a C program for the following system that checks the levels of gas A, gas B and gas C. The C program should prompt the user to input the percentages of each. Then, if any of the following conditions occur, the computer should output WARNING:

  • A levels are over 0.2%
  • B levels are over 2%
  • C levels are under 17%

If none of those conditions are true, the computer should say All is good.

*Noted: Make the program repeat itself indefinitely. The sample outputs for two (2) separate runs are shown below. The bold numbers in the example indicate the values entered by the user

Ex1:

Enter A percentage: 0.1 *hit enter key*

Enter B percentage: 2 *hit enter key*

Enter C percentage: 14 *hit enter key*

All is good

Ex2:

Enter A percentage: 0.3 *hit enter key*

Enter B percentage: 2 *hit enter key*

Enter C percentage: 15 *hit enter key*

WARNING /* and beep three times */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!