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
15. How many PC’s can be connected to a UPS?
Alex_Xolod [135]

Answer: Depends on the power of the computer /computers and the UPS

Explanation: For someone who had a big connected network of computers and printers we would plug the computer or server into the UPS as well as the monitor and sometimes a printer sometimes the monitor was plugged into the wall

When you get a UPS you must plug it in for a certain time could be hours or even a day.  A USP has a big battery in it and you must charge it (sometimes it comes semi-charged but you must plug it in to strengthen it. )

there are two connector wires that you affix to the battery and you must put a lot of strength into it to make it secure.

So in closing, you can get away with two like a desktop and a laptop.

Read your documentation that comes with the UPS

6 0
2 years ago
A technician is troubleshooting a computer that will not communicate with any hosts on the local network. While performing a vis
tangare [24]

Answer:

Assuming that D is correct, the other answer is C.

Explanation:

<em>I used Dell Support to confirm this.</em>

It states that if the lights are off, it is not detecting the network and no connection is in place. You would want to confirm the NIC is enabled in the BIOS (as C states).

I hope this helps!

8 0
3 years ago
A programmer wants to write a procedure that calculates the net elevation - total number of feet a traveler goes up and down. Fo
ch4aika [34]

Answer:

Pseudocode

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Integer netElevation(list of elements of type elevation - type and number)

<em>function open</em>

   Define running total = 0

   for each element from list

   <em>loop open</em>

       elevation type = element[i].type

      if (elevation type == Up)

           running total = running total + element[i].number

       else

           running total = running total - element[i].number

   <em>loop close</em>

   return running total

<em>function close</em>

3 0
3 years ago
A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi
Mamont248 [21]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   int qty;

   float discount = 0;

   cout<<"Quantity: ";

   cin>>qty;

   int cost = qty * 100;

i f (cost > 1000) {        discount=cost * 0.10;        }

   cout<<"Cost: "<<cost - discount;

   return 0;

}

Explanation:

This declares the quantity as integer

   int qty;

This declares and initializes discount to 0

   float discount = 0;

This prompts the user for quantity

   cout<<"Quantity: ";

This gets input for quantity

   cin>>qty;

This calculates the cost

   int cost = qty * 100;

If cost is above 1000, a discount of 10% is calculated

i f (cost > 1000) {        discount=cost * 0.10;        }

This prints the cost

   cout<<"Cost: "<<cost - discount;

4 0
3 years ago
Some people argue that developers should not be involved in testing their own code but all testing should be the responsibility
GalinKa [24]

Answer:

People code in their own styles which can make it hard for other people to understand it, especially if it doesn't have any documentation, but that could be a reason to let a separate team test it, so the developer can learn how to code in a way that is understood by most people.

Explanation:

7 0
3 years ago
Other questions:
  • Which component of the Hyper-V architecture controls all communication with the physical hardware on the computer?
    8·1 answer
  • Which is true about lists and stacks?
    8·1 answer
  • Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the
    7·1 answer
  • In the sentence below, identify the proofreader's marks used.<br><br>Check my answer please :)
    14·1 answer
  • Match the term to the correct definition.
    6·1 answer
  • Scrie un program care citind varstele a 2 copii afiseaza care dintre ei este cel mai mare si cu cat. Exemplu: Pentru varstele 5
    9·1 answer
  • 1. Write the full forms of the following.
    5·2 answers
  • Write a program to generate the following series 1, 3, 5, 7, 9, 11.................. 10th​
    10·1 answer
  • TRUE OR FALSE
    14·1 answer
  • Suppose a computer's login mechanism first asks for a user name, and then for the password, regardless of whether or not the log
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!