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
ira [324]
3 years ago
13

Java

Computers and Technology
1 answer:
Valentin [98]3 years ago
3 0

Answer:

import java.util.Scanner;

public class LabProgram{

    public static void main(String []args){

       Scanner input = new Scanner(System.in);

       int red,blue,green,smallest;

       System.out.print("Enter three numbers between 0 and 255 (inclusive): ");

       red =input.nextInt();

       green =input.nextInt();

       blue =input.nextInt();

       

       if(red <= blue && red <= green){

       smallest = red;

       }

       else if(green <= red && green <= blue){

           smallest = green;

       }

       else{

            smallest = blue;

       }

       System.out.print((red - smallest)+" "+(green - smallest)+" "+(blue - smallest));

}

}

Explanation:

This line declares necessary variables

int red,blue,green,smallest;

This line prompts user for input of 3 numbers

System.out.print("Enter three numbers between 0 and 255 (inclusive): ");

The next three lines gets user inputs

       red =input.nextInt();

       green =input.nextInt();

       blue =input.nextInt();

The following iteration checks for the smallest for red, green, blue

       if(red <= blue && red <= green){

       smallest = red;

       }

       else if(green <= red && green <= blue){

           smallest = green;

       }

       else{

            smallest = blue;

       }

This line prints the required output

       System.out.print((red - smallest)+" "+(green - smallest)+" "+(blue - smallest));

You might be interested in
I NEED IT NOWW
Montano1993 [528]

Answer: the answer ur looking for is  option : a

3 0
4 years ago
Read 2 more answers
Once the data center routes to the destination server that hosts the website, what's the next step in the Internet process?
ikadub [295]

Answer:

the spreading of the server distance range

Explanation:

8 0
3 years ago
You are troubleshooting a mobile device with no sound output from the headset or external speakers.
klasskru [66]

Answer:

Q)Which of the following steps should you take first?

Verify the physical volume control is turned up.

7 0
4 years ago
Brent recently received funding for his fast-food chain in Michigan. As a result, he hires Angela to set up a top-level domain s
Elena-2011 [213]

The option among the top level domain names that Angela should opt for under such requirements is .biz.

<h3>What's a domain name? </h3>

Domain names are known to be formed to create IP addresses very easy so that one can easily remember.

Note that the domain name of biz is better for Angela to use as it is suitable for her business and as such, The option among the top level domain names that Angela should opt for under such requirements is .biz.

Learn more about domain name from

brainly.com/question/17062016

#SPJ1

5 0
2 years ago
Which of the following button should always be included when designing a navigation pictures escape contact FAQ
evablogger [386]

Answer: Escape

Explanation: Exiting/Escaping current state within navigation is the universally needed action. Navigation menus can be complex and are hierarchical in nature. Users make mistakes and the only remedy is an escape function.

4 0
4 years ago
Read 2 more answers
Other questions:
  • An “AI” (artificial intelligence) could be used in:
    10·1 answer
  • Where do endnotes appear in a document? at the bottom of the page at the top of the page at the end of the document at the end o
    12·1 answer
  • Gina is upgrading your computer with a new processor. She installs the processor into your motherboard and adds the cooling syst
    13·2 answers
  • 3. Which one of the following statements is true for spell checkers?
    11·1 answer
  • Which encryption standard goes with the WPA2 protocol?<br> AES<br> DES<br> TKIP<br> WPS
    15·1 answer
  • What is Product Owner work that a Product Owner might delegate?
    10·1 answer
  • ¿Qué herramienta web es google drive?
    12·2 answers
  • Given a number count the total number of digits in a number
    12·1 answer
  • Please answer this question​
    13·1 answer
  • Why do we need to know the different Networking Devices?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!