Computers and Technology

Ask the user to enter a number for red, green, and blue components of an RGB value, which takes a certain amount of red, green, and blue colors and produces a new color. Test the numbers that are input by the user and check that each value is between 0 and 255 (inclusive). If a color's value is outside of this range, print which color's number is not correct (e. g., "Red number is not correct" if the red value is 300). Multiple colors may be out of range. The order of the colors should be the same as the sample runs below; red, then green, then blue. Hint: Since this lesson uses boolean operators, remember to use at least one boolean operator in each of your answers to receive full credit.

Sample Run 1
Enter the red: 150
Enter the green: 300
Enter the blue: 15
Sample Output 1
Green number is not correct.
Sample Run 2
Enter the red: 25
Enter the green: 124
Enter the blue: 105
Sample Output 2
Nothing is output if a user enters three numbers that are all within the range of 0 to 255.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:00, ionmjnm3041
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
image
Computers and Technology, 24.06.2019 12:30, coursonianp8izbc
Do you think media is stereotype ? and why?
Answers: 1
image
Computers and Technology, 24.06.2019 22:00, ivethzurita0425
What is a number system, and what is the total number of digits used in this system called? a number system is a system that uses different (options: a) numbers b) symbols c) codes d) digits e) alphabets) to represent different numbers. the total number of digits used in a number system is known as its (options: 1) processor 2) converter 3) radix 4) least significant digit 5) most significant digit)
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, kappy10
A(n) is a step-by-step direction for performing a specific task, which is written in a language the computer can understand. servercachearrayprogram
Answers: 1
Do you know the correct answer?
Ask the user to enter a number for red, green, and blue components of an RGB value, which takes a ce...

Questions in other subjects:

Konu
Mathematics, 23.06.2019 21:00