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
What does module in Python do? How to install it? Thanks!
lyudmila [28]
A Python module is an extension file which contains programmable resources for a given translation unit. This is very much like a header file in C and C++, it's modularized data. For example, say I wanted to write a server/client script. I can't easily do so with Python out of the box. I would require the "socket" module which contains all of the functions, variables and data structures which allow for network programming.

network.py
___________
from socket import *

s = socket(AF_INET, SOCK_STREAM)
(...)
8 0
3 years ago
Which of the following is not a mobile means of connecting devices to networks?
ElenaW [278]

Answer:

USB cables.

Explanation:

Think of what would happen if you started walking to a friend's house that is 3 houses away from yours. You have a cell and there are no others that you can see. Your friend calls you.

Could you hear what he says with a blue tooth earphone? Likely.

If you are connected by a wifi device. Again likely.

What about a broad band. That would be possible too.

So what about a USB cable. Now there's a problem. The cable would have to be at least 75 feet long (city plots are usually somewhere in the neighborhood of 25 feet wide). You would need an awfully long cable. And that's only 3 houses away.

6 0
3 years ago
I need help plz
Alik [6]

Answer:

Try to restart your computer, if it doesn't work try looking up what to if anti-virus protection comes up randomly, without needing it.

Explanation:

Not Sure if you'll still get it even after restarting, but if it doesn't then hard shutdown the computer, So it could refresh it.

6 0
3 years ago
Read 2 more answers
Drag the tiles to the correct boxes to complete the pairs.
m_a_m_a [10]
<h2>Answer:</h2><h2>Releases a new video of its new high - tech manufacturing facility; To create a customer alert about a new program. </h2>

<h2>2)Hosts an online sweepstakes. .....;To increase brand loyalty </h2>

<h2>3)Gives bloggers.....:To give customers a peek into its operation.</h2>

<h2>4)Asks customers to determine their. .....;To allow customers to be part of the product development. </h2>

3 0
3 years ago
4. A friend knows you are taking a technology class in college and asks you how a hard drive works. In your own words, describe
sveticcg [70]
Keep it simple... it holds whatever info' you want. would he/she understand?


3 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose an array with six rows and eight columns is stored in row major order starting at address 20 (base 10). If each entry in
    8·1 answer
  • What are the 7 basic components found in a computer tower
    5·2 answers
  • One of the ways attackers can access unencrypted data being transmitted on your network is by
    10·1 answer
  • Where will the CPU store data for easy access and quick retrieval during these computations?
    13·1 answer
  • True / Fasle
    13·1 answer
  • Convert the following C program to C++.
    9·1 answer
  • After a failover cluster is created, which of the following is a task to be performed when configuring the failover cluster? (Ch
    8·1 answer
  • A computer on a network that is not the server​
    15·1 answer
  • Expressions provide an easy way to perform operations on data values to produce other data values. True False
    11·1 answer
  • What was Ada Lovelace's contribution to computer science?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!