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
spin [16.1K]
3 years ago
13

Write a method called min that takes three integers as parameters and returns the smallest of the three values, such that a call

of min(3, -2, 7) would return -2, and a call of min(19, 27, 6) would return 6. Use Math.min to write your solution.
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
7 0

Answer:

public class Main

{

public static void main(String[] args) {

 System.out.println(min(3, -2, 7));

}

public static int min(int n1, int n2, int n3){

    int smallest = Math.min(Math.min(n1, n2), n3);

    return smallest;

}

}

Explanation:

*The code is in Java.

Create a method named min that takes three parameters, n1, n2, and n3

Inside the method:

Call the method Math.min() to find the smallest among n1 and n2. Then, pass the result of this method to Math.min() again with n3 to find the min among three of them and return it. Note that Math.min() returns the smallest number among two parameters.

In the main:

Call the method with parameters given in the example and print the result

You might be interested in
How to remove a course from your canvas calander feed.
Ilya [14]

Answer:

Access Canvas, then click the Calendar link from the navigation menu on the left.Click the Agenda tab.Make sure that all the entries you'd like to remove are displayed. ...Click the entry you'd like to remove then click Delete.Click Delete to confirm

Explanation:

Read Carefully and Take it Step by Step

That's it

5 0
2 years ago
PLSSSSS HELPP!! Tropical rainforests are home to many kinds of birds, including parrots, toucans and eagles. Each different spec
Elanso [62]

Answer:

C I believe

Explanation:

5 0
3 years ago
Read 2 more answers
Illl give brainliest plzzzzzzzzzz
salantis [7]

The one paste symbol name is : paste settings

it consist of 'paste special' and 'set default paste if im not wrong'

3 0
3 years ago
Important of microcomputer in some point​
Sedbober [7]

Answer:

A microcomputer uses memory to store the programs that control its operation, to store data waiting for processing, and to store the results of operations performed by the CPU. Primary memory, or storage, is electronic memory that is directly addressable by the CPU.

Explanation:

brainliest plzzzzzzz

8 0
3 years ago
Read 2 more answers
Why is it important to stand clear and not touch the person while the AED is analyzing or defibrillating?
galben [10]

Answer:

Because you could also receive shock

Explanation:

Automatic external defibrillators can help save lives during sudden cardiac arrest.

Do not touch the person while the AED is analyzing; touching or moving the person can affect the analysis. You or another person could be injured by shock. And you could prevent the AED from analyzing your heart rate correctly.

5 0
3 years ago
Other questions:
  • Which opera component is a solo performance
    10·2 answers
  • Which of these are examples of skills?
    5·2 answers
  • Which of the following is a step in paraphrasing?
    14·2 answers
  • A user calls to report that she is experiencing intermittent problems while accessing the wireless network form her laptop compu
    9·1 answer
  • A __________ is when the sender cryptographically marks a message with its private key, which is achieved by a cryptographic alg
    12·1 answer
  • Pick the simplest line of code to test if the word "BASIC" is stored in the variable text1.
    12·1 answer
  • ___ is a family of data formats that helps people automatically receive feeds anytime there are new postings to their favorite b
    14·1 answer
  • According to a case study in one of our weekly chapter reading, nearly..................... percent of all employees send work e
    11·2 answers
  • Which of the following events happened first
    15·2 answers
  • Write about how this item was important to you.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!