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
Earning wise scope of web and mobile app development
lubasha [3.4K]

Answer:

Mobile are build in a specific platform such as Android, iOS ect and they use application such as apple store and have access to the system such as GPS and the camera. Mobile apps live and run on mobiles as on they are their own thing controlled by a developer on the other end

Explanation:

3 0
3 years ago
Where could identity theft access your personal information?
riadik2000 [5.3K]
From hacking into public websites where you pay and stuff, or put in a fake official window to lure out your private info.
6 0
3 years ago
Read 2 more answers
You have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you
love history [14]

Answer:

Make every attempt to recover the data

Explanation:

If your decide to format the drive, use system restore or reinstall the windows OS you may end up loosing all your data so the best option is to try as much as you can attempting to recover the data because the data might or definitely will be lost while using other options you think are available.

8 0
3 years ago
What term is given to the background area on the computer display that usually contains one or more icons for disks, application
Stella [2.4K]
The term for your question is desktop
8 0
3 years ago
I.C.T
oee [108]

Soft and hard copies in my opinion

8 0
3 years ago
Read 2 more answers
Other questions:
  • Should I learn Python, C++, C# or VB to start off programming games for Windows. Open to other language recommendations as well!
    6·1 answer
  • Josie, your best friend, is having a huge Sweet Sixteen party. She has designated you to address all 100 of the envelopes (using
    7·1 answer
  • What is unique about the TODAY and NOW functions?
    15·2 answers
  • 9.4 Code Practice: Your task is to determine whether each item in the array above is divisible
    14·1 answer
  • What is the advantage of using the Publish Online option for sharing a calendar? It creates a web version that can be viewed by
    9·2 answers
  • Discuss Hardware is useless without software?​
    14·1 answer
  • Brainliest to right answer.
    10·1 answer
  • Write a Python program (rainfall.py) to collect data and calculate the average rainfall over a period of years. The program shou
    11·1 answer
  • What is computer system ?​
    9·2 answers
  • Computer Vision and Industrial Robots
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!