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
artcher [175]
3 years ago
6

Define a function named LargestNumber that takes three integers as parameters and returns the largest integer. Define a second f

unction named SmallestNumber that takes three integers as parameters and returns the smallest integer. Then, write a main program that reads three integers as inputs, calls functions LargestNumber() and SmallestNumber() with the inputs as arguments, and outputs the largest and the smallest of the three input values. CORAL
Computers and Technology
1 answer:
marishachu [46]3 years ago
3 0

Answer:

Explanation:

The following code is written in Java and creates both of the requested methods. The methods compare the three inputs and goes saving the largest and smallest values in a separate variable which is returned at the end of the method. The main method asks the user for three inputs and calls both the LargestNumber and SmallestNumber methods. The output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number 1: ");

       int num1 = in.nextInt();

       System.out.println("Enter number 2: ");

       int num2 = in.nextInt();

       System.out.println("Enter number 3: ");

       int num3 = in.nextInt();

       System.out.println("Largest Value: " + LargestNumber(num1, num2, num3));

       System.out.println("Smallest Value: " + SmallestNumber(num1, num2, num3));

   }

   public static int LargestNumber(int num1, int num2, int num3) {

       int max = num1;

       if (num2 > num1) {

           max = num2;

       }

       if (num3 > max) {

           max = num3;

       }

       return max;

   }

   public static int SmallestNumber(int num1, int num2, int num3) {

       int smallest = num1;

       if (num2 < num1) {

           smallest = num2;

       }

       if (num3 < smallest) {

           smallest = num3;

       }

       return smallest;

   }

}

You might be interested in
The customer's endpoint device on the wan is called the __________________.​
Lelu [443]
<span>The customer's endpoint device on the WAN is called the Data Terminal Equipment (DTA).
WAN 
is wide area network, referring to a network that extends over a large area. DTA is an end instrument which converts information into signals.</span>
3 0
3 years ago
Three IT Companies. Help me please!
GuDViN [60]

Answer:

Apple, Samsung and Foxconn

Explanation:

They are the leading it companies today

3 0
3 years ago
Read 2 more answers
The use of public wireless connections can increase a user's vulnerability to monitoring and compromise. ____________ software c
GalinKa [24]

The use of public wireless connections can increase a user's vulnerability to monitoring and compromise. <u>VPN </u> software can be used to encrypt transmissions over public networks, making it more difficult for a user's PC to be penetrated.

Explanation:

  • A VPN, or Virtual Private Network, allows you to create a secure connection to another network over the Internet.
  • VPNs can be used to access region-restricted websites, shield your browsing activity from prying eyes on public Wi-Fi, and more. .
  • Virtual Private Network, is a private network that encrypts and transmits data while it travels from one place to another on the internet. VPNs aren't just for desktops or laptops, you can set up a VPN on your iPhone, iPad or Android phone.
  • A VPN encrypts the traffic from your machine to the exit point of the VPN network. A VPN isn't therefore likely to protect you from an adversary like Anonymous.
  • VPNs add another layer of encryption to your internet traffic, your latency will go up and speeds will go down.

3 0
4 years ago
The faster data transfer port for computer today is port
qwelly [4]

USB Type C or 3.0/3.1 is the fastest

8 0
3 years ago
A page break can be prevented from being added before or after a heading by using the keyword _____ in the page-break-before or
Sedaia [141]

Answer:

avoid

Explanation:

<h2><u>Fill in the blank </u></h2>

A page break can be prevented from being added before or after a heading by using the keyword <u>avoid</u>  in the page-break-before or page-break-after properties.

3 0
4 years ago
Other questions:
  • Generate the requested sets using only set builder notation and the provided sets. Some problems may require you to build one or
    15·1 answer
  • Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNu
    15·1 answer
  • Use a VLOOKUP function in cell I5 to identify and calculate the federal withholding tax. Use the tax rates from the range D21:E2
    15·1 answer
  • Select the Navy Admiral who invented a high-level programming language FLOW-MATIC in 1953.
    7·1 answer
  • Concerning Structured Cabling, select the statement that is true, or select, "All statements are false."
    5·1 answer
  • Anyone wanna play Smash Ultimate. I'm a Link main (that doesn't mean I camp, thats young link) who plays competitve with legal s
    8·1 answer
  • A software license gives the owner the to use software.
    12·2 answers
  • You want to be able to identify the services running on a set of servers on your network. Which tool would best give you the inf
    11·1 answer
  • drag each type of document to the correct location on the table. Drag each document to its respective category
    7·1 answer
  • Will economists be replaced by artificial intelligence?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!