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
natta225 [31]
3 years ago
15

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. Thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Engineering
2 answers:
serg [7]3 years ago
6 0

Answer:

Using C++, the program appears as follows

#include <iostream>

using namespace std;

int main() {

int r,g,b,small;

//input values

cin>>r>>g>>b;

//find the smallest value

if(r<g && r<b)

small=r;

else if(g<b)

small=g;

else

small=b;

//subtract smallest of the three values from rgb values hence removing gray

r=r-small;

g=g-small;

b=b-small;

cout<<r<<" "<<g<<" "<<b<<endl;

}

Sindrei [870]3 years ago
5 0

Answer:

Using C++, the program is as follows;

#include <iostream>

using namespace std;

int main() {

int r,g,b,small;

//input values

cin>>r>>g>>b;

//find the smallest value

if(r<g && r<b)

small=r;

else if(g<b)

small=g;

else

small=b;

//subtract smallest of the three values from rgb values hence removing gray

r=r-small;

g=g-small;

b=b-small;

cout<<r<<" "<<g<<" "<<b<<endl;

}

You might be interested in
Please answer fast. With full step by step solution.​
lina2011 [118]

Let <em>f(z)</em> = (4<em>z </em>² + 2<em>z</em>) / (2<em>z </em>² - 3<em>z</em> + 1).

First, carry out the division:

<em>f(z)</em> = 2 + (8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1)

Observe that

2<em>z </em>² - 3<em>z</em> + 1 = (2<em>z</em> - 1) (<em>z</em> - 1)

so you can separate the rational part of <em>f(z)</em> into partial fractions. We have

(8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1) = <em>a</em> / (2<em>z</em> - 1) + <em>b</em> / (<em>z</em> - 1)

8<em>z</em> - 2 = <em>a</em> (<em>z</em> - 1) + <em>b</em> (2<em>z</em> - 1)

8<em>z</em> - 2 = (<em>a</em> + 2<em>b</em>) <em>z</em> - (<em>a</em> + <em>b</em>)

so that <em>a</em> + 2<em>b</em> = 8 and <em>a</em> + <em>b</em> = 2, yielding <em>a</em> = -4 and <em>b</em> = 6.

So we have

<em>f(z)</em> = 2 - 4 / (2<em>z</em> - 1) + 6 / (<em>z</em> - 1)

or

<em>f(z)</em> = 2 - (2/<em>z</em>) (1 / (1 - 1/(2<em>z</em>))) + (6/<em>z</em>) (1 / (1 - 1/<em>z</em>))

Recall that for |<em>z</em>| < 1, we have

\displaystyle\frac1{1-z}=\sum_{n=0}^\infty z^n

Replace <em>z</em> with 1/<em>z</em> to get

\displaystyle\frac1{1-\frac1z}=\sum_{n=0}^\infty z^{-n}

so that by substitution, we can write

\displaystyle f(z) = 2 - \frac2z \sum_{n=0}^\infty (2z)^{-n} + \frac6z \sum_{n=0}^\infty z^{-n}

Now condense <em>f(z)</em> into one series:

\displaystyle f(z) = 2 - \sum_{n=0}^\infty 2^{-n+1} z^{-(n+1)} + 6 \sum_{n=0}^\infty z^{-n-1}

\displaystyle f(z) = 2 - \sum_{n=0}^\infty \left(6+2^{-n+1}\right) z^{-(n+1)}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{-(n-1)+1}\right) z^{-n}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{2-n}\right) z^{-n}

So, the inverse <em>Z</em> transform of <em>f(z)</em> is \boxed{6+2^{2-n}}.

4 0
3 years ago
When working cattle through a chute, stop cattle by moving…point of balance.
timofeeve [1]

When the handler has reached the point of balance of the animal, they should stop walking so that they may move only one animal at a time. The point of balance for cattle that are being worked with in limited places such as races and chutes is often found at the animal's shoulder, as seen by the diagrams.

This is further explained below.

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

Generally, Chutes are channels, planes, or passageways that are either vertical or slanted and through which things may be transported using only gravity.

In conclusion, When the handler has reached the point where the animal's point of balance has been crossed, they should stop walking so that they may move just one animal.

As seen in the illustrations, the point of balance for cattle being worked with in restricted spaces like races and chutes is often located at the animal's shoulder.

Read more about chute

brainly.com/question/10976905

#SPJ1

3 0
1 year ago
Name two common fuel gases that can be used for oxyfuel cutting
zlopas [31]
Hi

Acetylene and propane

I hope this help you!
8 0
1 year ago
A weight-lifting athlete raises a mass of 160 kg through a vertical distance of 1.4 m. What force did
Over [174]

Answer:

1568N

2195.2J

Explanation:

Given parameters:

Mass of the weight = 160kg

Distance  = 1.4m

Unknown:

Force applied to lift the weight = ?

Energy expended  = ?

Solution:

The force applied in moving a body with a given mass through a distance is the weight;

     Force applied  = mg

Where m is the mass

           g is the acceleration due to gravity

i.  Applied force = 160 x 9.8  = 1568N

ii. The energy used to lift the weight is given as;

     Energy  = mgh

h is the vertical distance

     Energy  = 1568 x 1.4  = 2195.2J

8 0
3 years ago
Partnership budiness​
Ne4ueva [31]

Answer:

what does this mean

Explanation:

8 0
3 years ago
Other questions:
  • Use the image below to measure the blocks. Enter your measurement in centimeters accurate to the 0.1 cm.
    5·1 answer
  • The Release Train Engineer is a servant leader who displays which two actions or behaviors?
    6·1 answer
  • A heating element in a stove is designed to receive 4,430 W when connected to 240 V. (a) Assuming the resistance is constant, ca
    14·1 answer
  • What is 12 cm theodolite​
    8·2 answers
  • Timken rates its bearings for 3000 hours at 500 rev/min. Determine the catalog rating for a ball bearing running for 10000 hours
    7·1 answer
  • Which two factors does the power of a machine depend on? A. work and distance B. force and distance C. work and time D. time and
    12·1 answer
  • Visual aids are useful for all of the following reasons except
    11·1 answer
  • Which of the following conditions would completely shut down a circuit
    10·1 answer
  • Technician A says that much of the lighter GMAW welding work in a body shop can be done with a 115-volt welder. Technician B say
    14·1 answer
  • All of these are true about steel EXCEPT that:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!