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
liubo4ka [24]
3 years ago
5

Computers represent color by combining 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).
Computers and Technology
1 answer:
maxonik [38]3 years ago
4 0

Answer:

Follows are the code to this question:

#include <iostream>//defining a header file

using namespace std; //using namespace

int main() //defining main method

{

int red,green,blue,s; //defining integer variable

cout<<"Enter value: \n ";//print message

cin>>red>>green>>blue; //input value

if(red<green && red<blue)//defining if block that checks red value

s=red;//store red variable value to s variable

else if(green<blue)//defining else if block that checks green value less then blue

s=green;//store green variable value in s variable

else//defining else block

s=blue; //store blue variable value in s variable

//calculating red, green, blue value

red=red-s;//store red value

green=green-s;//store green value

blue=blue-s;//store blue value

cout<<red<<" "<<green<<" "<<blue;

}

Output:

Enter value:

130  

50

130

80 0 80

Explanation:

In the above code, inside the Main method, four integer variable "red, green, blue, and s" is 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, that checks the red variable value, if the condition is true, it will store its value in the "s" variable, otherwise, it will go to else if block.
  • In this block, the green variable checks its value less than then blue variable value, if the condition is true, it will store the green value in the "s" variable, otherwise, it will goto else block.
  • In this block, it will store the blue variable value in the "s" variable, and subtract the value of "red, green, and blue" value from "s" and store its value, and at the last, it will print its value.    
You might be interested in
How precisely can you rotate a graphic in a document?
Cloud [144]
Any picture of what our talking about
4 0
3 years ago
You work part-time at a computer repair store. You're building a new computer. The customer has requested two serial ATA (SATA)
Svetllana [295]

You should design and develop the computer system with two serial ATA (SATA) hard drives installed on it.

<h3>What is a computer?</h3>

A computer can be defined as an electronic device that is designed and developed to receive data in its raw form as an input and it processes these data into an output (information), which can be used to perform a specific task through the use of the following computer parts:

  • Keyboard
  • Network
  • Monitor screen
  • Mouse
  • Hard drive

<h3>What is a hard drive?</h3>

A hard drive can be defined as an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.

Based on the information provided, we can logically deduce that you're required to design and developed a computer with two serial ATA (SATA) hard drives.

In conclusion, you should follow the aforementioned steps to develop this computer with two serial ATA (SATA) hard drives installed on it.

Read more on hard drive here: brainly.com/question/26382243

#SPJ1

5 0
2 years ago
Your team is creating web pages for the company intranet. some of the pages include advanced technologies, so you need to ensure
Rama09 [41]
To run the application the web server need to be configured.
6 0
4 years ago
What Windows PowerShell commands should you use to create a simple volume of the same size on disk 3 using the drive letter G:?
emmainna [20.7K]
The solution for this problem is 

<span>Create a new partition on disk 1

</span>PS C:\> New-Partition -DiskNumber 1<span> -UseMaximumSize -AssignDriveLetter
</span>
This command lets you create a new partition disk and the same time uses the maximum available space as well as the automatically assigning it into a drive.
7 0
3 years ago
Which of the following describe why a repeat block would be used in a project
iogann1982 [59]

Answer :If a project uses a  Repeat block  the same logic always holds when the commands are executed. Both block stacks perform the same behaviour.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • TCP waits until it has received three duplicate ACKs before performing a fast retransmit. Why do you think the TCP designers cho
    13·1 answer
  • Which of the following is a definition of conventions?
    8·1 answer
  • Other side for bullying
    7·1 answer
  • 1. Show the 16-bit representation of the decimal number 2437. Show your steps. 2. Convert the 16-bit representation of part (a)
    12·1 answer
  • Match each Excel term to its definition. cell a group of cells containing related data ribbon a row of tabs, groups, and command
    10·1 answer
  • A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
    14·1 answer
  • I need trash talk for a comeback:
    11·2 answers
  • Every time attribute A appears, it is matched with the same value of attribute B, but not the same value of attribute C. Therefo
    11·1 answer
  • What are the four components of security documentation?
    9·1 answer
  • Assume that the Vehicle class contains a virtual method named CalculateMaxSpeed(). Assume that both the MotorVehicle and Automob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!