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
A vehicle of 1 200 kg is moving at a speed of 40 km/h on an incline of 1 in 50. The total constant rolling and wind resistance i
Readme [11.4K]

Answer:11.602 KW

Explanation:

mass of vehicle\left ( m\right )=1200 kg

speed=40Km/h

Resistance=600 N

\eta =80%

Gear ratio\left ( G\right )=4:1

D_{effective}=500mm

Net force to overcome by engine is

F=Resistance + sin component of weight

F=600+mgsin\theta

Where tan\theta =[tex]\frac{1}{50}

\theta =1.1457^{\circ}

F=600+1200\times 9.81\times sin\left ( 1.1457\right )

F=600+235.38=835.38 N

power=F.v=835.38\frac{100}{9}

Engine Power=\frac{835.\frac{100}{9}}{\eta }=11.602 KW

4 0
4 years ago
Poles are values of Laplace transform variable, s, that make denominator of transfer function zero. Zeros are values of Laplace
Ostrovityanka [42]

Answer:

Zero 1 = -1

Zero 2 = -3

Pole 1 = 0

Pole 2 = -2

Pole 3 = -4

Pole 4 = -6

Gain = 4

Explanation:

For any given transfer function, the general form is given as

T.F = k [N(s)] ÷ [D(s)]

where k = gain of the transfer function

N(s) is the numerator polynomial of the transfer function whose roots are the zeros of the transfer function.

D(s) is the denominator polynomial of the transfer function whose roots are the poles of the transfer function.

k [N(s)] = 4s² + 16s + 12 = 4[s² + 4s + 3]

it is evident that

Gain = k = 4

N(s) = (s² + 4s + 3) = (s² + s + 3s + 3)

= s(s + 1) + 3 (s + 1) = (s + 1)(s + 3)

The zeros are -1 and -3

D(s) = s⁴ + 12s³ + 44s² + 48s

= s(s³ + 12s² + 44s + 48)

= s(s + 2)(s + 4)(s + 6)

The roots are then, 0, -2, -4 and -6.

Hope this Helps!!!

3 0
4 years ago
You have a motor that runs at 1.5 amps from a 12 volt power source, how many watts of power is it using?
Leviafan [203]

Answer:

18 Watts

Explanation:

For this problem, we simply need to understand the relationship of power to voltage and current.  This relationship is derived from Ohm's law:

Power = Voltage * Current

Given this equation, we can say the following to find the power consumption of the motor:

Power = 12volts * 1.5amps

Power = 18 Watts

Hence, the motor is consuming 18 Watts of power.

Cheers.

3 0
3 years ago
*sapnap teaching you how to drive*
Nataliya [291]

Answer:

yes dream

Explanation:

8 0
3 years ago
Read 2 more answers
Technician A says that a special wire brush is needed if it will be rotated at high rpm. Technician B says that some wire brushe
Charra [1.4K]

Answer:

Option C

Both A and B

Explanation:

Both technicians are right about what they say about wire brushes. wire brushes are usually made up of steel wire bristles. however, when high RPMs are involved, it is better to get some special types of brushes for that purpose. This is because the heat generated at high RPMs is great, and most times, damages the brush after prolonged use if it is not specially built for such speeds.

In addition that, some wire brushes have plastic hubs which help support the bristles and is usually  attached to the motor.

Considering these, we can say that the Two technicians are right

5 0
4 years ago
Other questions:
  • (a)Compute the electrical conductivity of a cylindrical silicon specimen 7.0 mm (0.28 in.) diameter and 57 mm (2.25 in.) in leng
    9·1 answer
  • The closed tank of a fire engine is partly filled with water, the air space above being under pressure. A 6 cm bore connected to
    9·1 answer
  • Which task best fits the role of a planning engineer?
    13·1 answer
  • Consider water at 27°C in parallel flow over an isothermal, 1‐m‐long flat plate with a velocity of 2 m/s. a) Plot the variation
    15·1 answer
  • You are out of gas in the desert and you accidently dropped your phone battery down an Abandoned oil well. You have a charged ca
    14·1 answer
  • Describe the function of empirical evidence in an audiologist’s practice. Pls help! 30 points if you answer this!
    6·1 answer
  • What year did Vidal Sassoon come to America ?
    7·2 answers
  • 1) Plastics that soften when heated,harden when cooled, and then can be heated and softened many times
    6·1 answer
  • If a population has no predadors and plenty of available resources, how might that population change
    15·1 answer
  • If a 110-volt appliance requires 20 amps, what is the total power consumed?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!