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]
2 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]2 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
Many major employers routinely monitor the performance of their employees through the computers and telephones they use. Employe
STALIN [3.7K]

Answer:

Employers are allowed to check the number of keystrokes that word processors enter during the day.

Explanation:

An employer is authorized to monitor the activity of its employee when:

  • The employee authorizes it.
  • The employer owns the system to be used.
  • Surveillance is necessary for a strictly professional purpose.

By analyzing the keys pressed per day, the employer can determine the performance provided by its employees, and if they use the company's resources, for non-work purposes.

5 0
3 years ago
Select the function of keypunches that were used as one of the earliest input devices. A. It was used to control the cursor on t
natali 33 [55]

Answer:

Select the function of keypunches that were used as one of the earliest input devices.(1 point) -It was used for punching holes in the paper at relevant ...

Explanation:

3 0
1 year ago
How do I answer a question that was answered incorrectly on Brainly
Mashcka [7]

Answer:

Explanation:

Go and ask a teacher or search

6 0
3 years ago
Read 2 more answers
Insecurely attached infants who are left my their mothers in an unfamiliar setting often will
Temka [501]

Insecurely attached infants who are left my their mothers in an unfamiliar setting often will Hold fast in their mothers in their return.

A. Hold fast in their mothers in their return

<u>Explanation:</u>

It is in the conscience of the infants to have the company of their parents no matter the place or time and do not generally like to be left alone. Moreover, the questions says, insecurely attached infants which further add up to this behavior.

The infant would not explore the surroundings due to lack of confidence in an unfamiliar setting. They would rather be uncomfortable and most probably weep the time until their mother arrives and hold fast on to them on their return.  

8 0
3 years ago
3. This shows you the different things that all the tools can do, as you click on the tools
leva [86]
D that’s the answer I learn that in my old school
7 0
3 years ago
Other questions:
  • Write a Tip Calculator in code in VMware Fusion
    13·1 answer
  • The very first thing I should type when creating a formula in excel is:
    15·2 answers
  • "Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag
    11·1 answer
  • What determines how large the crystals in an igneous rock will be?
    15·2 answers
  • Hosts A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Sup
    10·1 answer
  • What are the examples of shareware?
    9·2 answers
  • Weak Induction
    8·1 answer
  • You are configuring NIC teaming on a server with two network adapters. You chose Switch Independent Mode. You now must choose be
    15·1 answer
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • Name any three areas of of application of excel.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!