Write a C program that reads the value of an integer variable x and the value of a character variable color from the keyboard (R' for red, 'G’ for green, B’ for blue), and decides if the color is...




The code should be written and worked out in C programming language only.




Please do not write in other programming languages because code sources written in other languages will not work for me.




Only use #include as a header.




Please do not use #include or other headers.


Write a C program that reads the value of an integer variable x and the value of a character<br>variable color from the keyboard (R' for red, 'G’ for green, B’ for blue), and decides if the<br>color is correct according to the given range.<br>Red<br>Green<br>Blue<br>10<br>20<br>30<br>If x is between 0 and 10, color must be red<br>If x is between 11 and 20, color must be green<br>If x is between 21 and 30, color must be blue<br>If the color is correct according to the given range, print

Extracted text: Write a C program that reads the value of an integer variable x and the value of a character variable color from the keyboard (R' for red, 'G’ for green, B’ for blue), and decides if the color is correct according to the given range. Red Green Blue 10 20 30 If x is between 0 and 10, color must be red If x is between 11 and 20, color must be green If x is between 21 and 30, color must be blue If the color is correct according to the given range, print "correct color"; otherwise print “wrong color" If x is out of this range, print “out of range"

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here