answer.
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]
2 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]2 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
Generating a signature with RSA alone on a long message would be too slow (presumably using cipher block chaining). Suppose we c
boyakko [2]

Answer:

Following are the algorithm to this question:

Explanation:

In the RSA algorithm can be defined as follows:  

In this algorithm, we select two separate prime numbers that are the "P and Q", To protection purposes, both p and q combines are supposed to become dynamically chosen but must be similar in scale but 'unique in length' so render it easier to influence. Its value can be found by the main analysis effectively.  

Computing N = PQ.  

In this, N can be used for key pair, that is public and private together as the unit and the Length was its key length, normally is spoken bits. Measure,

\lambda (N) = \ lcm( \lambda  (P), \lambda (Q)) = \ lcm(P- 1, Q - 1)  where \lambda is the total function of Carmichaels. It is a privately held value. Selecting the integer E to be relatively prime from 1and gcd(E,  \lambda (N) ) = 1; that is E \ \ and  \ \ \lambda (N).  D was its complex number equivalent to E (modulo \lambda (N) ); that is d was its design multiplicative equivalent of E-1.  

It's more evident as a fix for d provided of DE ≡ 1 (modulo \lambda (N) ).E with an automatic warning latitude or little mass of bigging contribute most frequently to 216 + 1 = 65,537 more qualified encrypted data.

In some situations it's was shown that far lower E values (such as 3) are less stable.  

E is eligible as a supporter of the public key.  

D is retained as the personal supporter of its key.  

Its digital signature was its module N and the assistance for the community (or authentication). Its secret key includes that modulus N and coded (or decoding) sponsor D, that must be kept private. P, Q, and \lambda (N) will also be confined as they can be used in measuring D. The Euler totient operates \varphi (N) = (P-1)(Q - 1) however, could even, as mentioned throughout the initial RSA paper, have been used to compute the private exponent D rather than λ(N).

It applies because \varphi (N), which can always be split into  \lambda (N), and thus any D satisfying DE ≡ 1, it can also satisfy (mod  \lambda (N)). It works because \varphi (N), will always be divided by \varphi (N),. That d issue, in this case, measurement provides a result which is larger than necessary (i.e. D >   \lambda (N) ) for time - to - time). Many RSA frameworks assume notation are generated either by methodology, however, some concepts like fips, 186-4, may demand that D<   \lambda (N). if they use a private follower D, rather than by streamlined decoding method mostly based on a china rest theorem. Every sensitive "over-sized" exponential which does not cooperate may always be reduced to a shorter corresponding exponential by modulo  \lambda (N).

As there are common threads (P− 1) and (Q – 1) which are present throughout the N-1 = PQ-1 = (P -1)(Q - 1)+ (P-1) + (Q- 1)), it's also possible, if there are any, for all the common factors (P -1) \ \ \ and \ \ (Q - 1)to become very small, if necessary.  

Indication: Its original writers of RSA articles conduct their main age range by choosing E as a modular D-reverse (module \varphi (N)) multiplying. Because a low value (e.g. 65,537) is beneficial for E to improve the testing purpose, existing RSA implementation, such as PKCS#1, rather use E and compute D.

8 0
1 year ago
1. What might you say to someone whose reason for investing in 90% bonds and 10% stocks is that they want a 6% return on investm
Gemiola [76]

Investing in 90% bonds and 10% stocks will provide an average return of 6% on investment.It is advisable to invest more portion in bonds  is safe and will give higher return for investment than stocks

Explanation:

1. According to the graph investing in 90% bonds and 10% stocks will provide an average return of 6% on investment.

2.Investing in bonds is safe than stocks ., because bonds bear fixed rate of interest ., and investing in the bonds having very less risk than the stocks. By comparing stocks and bonds with the help of graph ., it's very clear bonds has a positive growth starting minimum at 32.6% to maximum at 64.2% as returns .But stocks has a negative growth (value) from -8.2% to maximum -43.1% .,It is advisable to invest more portions in bonds is safe and better than invest in stocks.

5 0
2 years ago
Axel is finally documenting his work. What could he be writing?
allochka39001 [22]

Answer: maybe his wrtting ezam

Explanation:

7 0
2 years ago
"Describe how implementation of a RAID Level 2 system would be beneficial to a university payroll system. In your own words, des
Darina [25.2K]

Answer:

In RAID 2 Hamming Code ECC Each piece of the information word is kept in touch with an information plate drive . Every datum word has its Hamming Code ECC word recorded on ECC circles. On Read, the ECC code confirms the right information or revises the single plate blunders.  

Strike Level 2 is one of the two innately equal mapping and assurance strategies characterized in the Berkeley paper. It has not been broadly sent in the business to a great extent since it requires an extraordinary plate highlights. Since plate creation volumes decides the cost, it is increasingly practical to utilize standard circles for the RAID frameworks.  

Points of interest: "On the fly" it gives information blunder amendment. Amazingly high information move rates is possible.Higher the information move rate required,better the proportion of information circles to ECC plates. Moderately basic controller configuration contrasted with the other RAID levels 3,4 and 5.  

Impediments: Very high proportion of the ECC plates to information circles with littler word sizes - wasteful. Passage level expense are extremely high - and requires exceptionally high exchange rate prerequisite to legitimize. Exchange rate is equivalent to that of the single plate, best case scenario (with shaft synchronization). No business executions can't/not industrially suitable.

4 0
2 years ago
Assume the secret key is: (1, 2, 3, 4) -&gt; (3, 1, 4, 2); assume the plaintext THEYLOVEIT. If the sub-block length is 3, what i
Alex777 [14]
I belive their were answer chocies to this question am i right 

8 0
1 year ago
Other questions:
  • Splunk uses ________ to categorize the type of data being indexed..
    11·2 answers
  • Your computer is crashing on a regular basis. Which of the following is an operation available to the user that should help rese
    14·2 answers
  • An administrator has initiated the process of deploying changes from a sandbox to the production environment using the Force IDE
    5·1 answer
  • Which of the following is true of information systems?
    15·1 answer
  • Write the printItem() method for the base class. Sample output for below program:
    8·1 answer
  • If the input is negative, make numItemsPointer be null. Otherwise, make numItemsPointer point to numItems and multiply the value
    9·1 answer
  • There are two cons to an OLTP database. Which of the following are a solution of these cons?​
    9·1 answer
  • EVERYONE LISTEN!!!! PLEASE COPY THIS MESSAGE AND RESEND!!!!
    11·2 answers
  • 1-(50 points) The function sum_n_avgcomputes the sum and the average of three input arguments and relays its results through two
    8·1 answer
  • The word “computer” has become associated with anything related to screens and keyboard. However, these are not the only parts t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!