1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
eimsori [14]
4 years ago
11

Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combinin

g the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray.Note: This page converts rgb values into colors.
the answer:
#include
using namespace std;
int main() {
int red;
int green;
int blue;
cin >> red >> green >> blue;
if ((red <= green) && (red <= blue)) {
cout << red;
}
else if ((green <= red) && (green <= blue)) {
cout << green;
}
else {
cout << blue;
}
return 0;
}
Computers and Technology
1 answer:
Dmitry_Shevchenko [17]4 years ago
5 0

Answer:

Follows are the code to this question:

#include<iostream>//defining header file

using namespace std;// use package

int main()//main method

{

int red,green,blue,x;//declaring integer variable

cin>> red >>green>>blue;//use input method to input value

if(red<green && red<blue)//defining if block that check red value is greater then green and blue  

{

x = red;//use x variable to store red value

}

else if(green<blue)//defining else if block that check green value greater then blue  

{

x= green; //use x variable to store green value

}

else//defining else block

{

x=blue;//use x variable to store blue value

}

red -= x;//subtract input integer value from x  

green -=x; //subtract input integer value from x

blue -= x;//subtract input integer value from x

cout<<red<<" "<<green<<" "<<blue;//print value

return 0;

}

Output:

130 50 130

80 0 80

Explanation:

In the given code, inside the main method, four integers "red, green, blue, and x" are defined, in which "red, green, and blue" is used for input the value from the user end. In the next step, a conditional statement is used, in the if block, it checks red variable value is greater than then "green and blue" variable. If the condition is true, it will store red variable value in "x", otherwise, it will goto else if block.

  • In this block, it checks the green variable value greater than the blue variable value. if the condition is true it will store the green variable value in x variable.
  • In the next step, else block is defined, that store blue variable value in x variable, at the last step input variable, is used that subtracts the value from x and print its value.      
You might be interested in
Html quickly evolved through specifications that are the result of the collective work of the organization known as the ____.
Archy [21]

Html quickly developed thanks to specifications that came up as a result of the World Wide Web Consortium's joint work (W3C).

<h3>What is world wide web consortium (W3C)?</h3>
  • The main worldwide standards body for the World Wide Web is the World Wide Web Consortium.
  • The consortium, which was established in 1994 and is now chaired by Tim Berners-Lee, is made up of member organizations that employ full-time workers to collaborate on developing standards for the World Wide Web.
  • In order to create Web standards, member organizations, a full-time staff, and the general public collaborate inside the World Wide Web Consortium (W3C).
  • W3C's goal is to lead the Web under the direction of Web creator and Director Tim Berners-Lee and CEO Jeffrey Jaffe.

To learn more about world wide web consortium (W3C), refer to:

brainly.com/question/11397745

#SPJ4

7 0
2 years ago
What is the quick key to highlighting a column?
BaLLatris [955]

Answer:

B is the answer.. pls mark me as brainliest

ctrl+shift+down arrow

Explanation:

7 0
4 years ago
Two fingers are assigned to six letters each. What fingers are they?
Lena [83]

Answer:

The left and right index finger

Explanation:

Left index finger: R, T, F, G, C, V

Right index finger: Y, U, H, J, B, N

8 0
3 years ago
Select the correct answer.
Shtirlitz [24]

Answer:

The right answer is text. we just need to just mention the date inside the text, and also mention the cell number, where you want that to be printed. The formula is Text(B1, "MM-DD-YY").

The other mentioned are a detailed information, and contains a mixed blend of information. The table, chart, flowchart and the shapes contains different data type. However, text is a data type, and date can be converted into text date type through the above formula. Hence, we are converting the date data type to text data type.

Explanation:

The answer is self explanatory.

6 0
3 years ago
n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
Alinara [238K]
<span>I presume the 2 at the end of the formula is a typo (as the 2 and half will cancel each other out if it means to multiply by 2)

pseudocode excludes it: float s0 = 12.0
float v0 = 3.5
float a = 9.8
float t = 10
s = s0 + v0 * t + (a * t) / 2 Output(s) </span>
7 0
3 years ago
Other questions:
  • The wires that transfer data across the motherboard are known as the
    9·1 answer
  • The c++ operator _______________ is used to destroy dynamic variables.
    5·1 answer
  • What rule should be followed when determining how many bullets you will include on a slide
    8·2 answers
  • What is the relationship between IaaS and TCP/IP and network services?
    10·2 answers
  • In the receiving computer, UDP receives a datagram from the __________ layer.
    15·1 answer
  • What does it mean when your phone says system ui has stopped?
    7·1 answer
  • Which of the following is used to allocate memory for the instance variables of an object of a class?1. the reserved word public
    6·1 answer
  • When is founded by java
    7·2 answers
  • An editing functions used to move selected text or objects to the Clipboard, from which they may be pasted elsewhere in the pres
    9·1 answer
  • your manager has asked you to implement a network infrastructure that will accommodate failed connections. which of the followin
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!