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
rodikova [14]
3 years ago
9

Write the definition of a method min that has two int parameters and returns the smaller.

Computers and Technology
1 answer:
swat323 years ago
3 0
<span>public class ExampleMinNumber <span>{
</span></span><span>     public static void main(String[] args) <span>{
          </span></span>int a = 11<span>;
         </span> int b = 6<span>;
</span><span>          int c = minFunction(a, b);
</span><span>     System.out.println("Minimum Value = " + c<span>);
}

</span></span><span>/** returns the minimum of two numbers */
</span><span>public static int minFunction(int n1, int n2) <span>{
    </span></span>int min<span>;
    </span>if (n1 > n2<span>)
       </span>min = n2<span>;
    else 
       min = n1;
  return min;
   }
}
</span>java 8.0
You might be interested in
2. Which company was first able to send a text? (Verizon, AT&amp;T, Cricket???)
zheka24 [161]

Answer:

I would say Nokia

Explanation:

Nolia was the first to create an SMS text message in 1993.

sorry if I am wrong :c

3 0
3 years ago
True or False: Visual Studio is not a part of Unity. You could use a different code editor to edit your C# scripts if you wanted
gizmo_the_mogwai [7]

Answer:

True

Explanation:

Visual Studio and Unity are two different things. Visual Studio is an IDE developed by Microsoft, and Unity is a game engine developed by another company. Visual Studio is the default editor in Unity, but you are able to use something different.

Source: https://docs.unity3d.com/Manual/ScriptingToolsIDEs.html

7 0
3 years ago
You are out on the water. you do not understand what another boater intends to do. what sound signal should you make?
olchik [2.2K]
When you do not understand what another boater intends to do, you are required to communicate this to the boater by sounding five or more short and rapid blasts. A short blast means a blast that takes about one second. The two vessel must stop or slow down until they clearly understand each other intent.
7 0
3 years ago
Which of the actions below will not create more room on your hard drive?
slavikrds [6]
A. defragging your hard drive
4 0
3 years ago
c++ 2.30 LAB: Phone number breakdown Given a long long integer representing a 10-digit phone number, output the area code, prefi
Nady [450]

Answer:

#include <iostream>

using namespace std;

int main()

{

   //declare variable to store phone numbers,its area code, prefix and line number.

   long phone_number;

   int area_code, prefix,line_number;

   cout<<"Enter 10-digit phone number:"<<endl;

   //input 10-digit phone number

   cin>>phone_number;

   //logic to find area_code, prefix, and line_number.

   area_code = phone_number/10000000;

   prefix = (phone_number/10000)%1000;

   line_number = phone_number%10000;

   //output phone number in asked format.

   cout<<area_code<<"-"<<prefix<<"-"<<line_number<<endl;

   return 0;

}

Output:

Enter 10-digit phone number:

8005551212

800-555-1212

Explanation:

In the above program 10 digit phone number entered by user will be stored in the variable phone_number.

Then using this phone_number variable area_code, prefix, and line number are calculated using the following logic:

area_code = phone_number/10000000;

prefix = (phone_number/10000)%1000;

line_number = phone_number%10000;

Finally these area_code, prefix, and line_number are displayed with hyphen in between using cout statement.

5 0
3 years ago
Other questions:
  • To include all fields in a sql query, use the ____ symbol after the word select.
    7·1 answer
  • What are personal skills? A manner of individual style How a person manages and expresses oneself One's ability to excel at spor
    13·2 answers
  • An example of java code for a sandwich shop menu
    13·1 answer
  • Please Help
    12·2 answers
  • HELP PLEASE ASAP!!! Does anyone know how to fix a broken iPhone which when I connect it to the charger it comes up with the Appl
    5·1 answer
  • You have created a PivotChart showing sales by quarter by sales rep. Before presenting it to management, you notice thename of a
    7·1 answer
  • Worksheet Identify the devices for moving the cursor around your computer screen
    12·1 answer
  • Need help please help me <br>I need it right now ​
    15·1 answer
  • IN WHICH COUNTRY DO THEY LET YOU PLAY MINECRAFT IN SCHOOL?
    8·2 answers
  • South Africa is the main supplier of which minerals in the world​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!