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]
2 years ago
9

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

Computers and Technology
1 answer:
swat322 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
Mica's creating his web page with a software that is free of charge for the first month. If he likes the program, he will have t
Katarina [22]
The answer is C. Shareware
4 0
3 years ago
Read 2 more answers
#Write a function called is_composite. is_composite should #take as input one integer. It should return True if the #integer is
malfutka [58]

Answer:

// A optimized school method based C++ program to check  

// if a number is composite.  

#include <bits/stdc++.h>  

using namespace std;  

bool isComposite(int n)  

{  

// Corner cases  

if (n <= 1) return false;  

if (n <= 3) return false;  

// This is checked so that we can skip  

// middle five numbers in below loop  

if (n%2 == 0 || n%3 == 0) return true;  

for (int i=5; i*i<=n; i=i+6)  

 if (n%i == 0 || n%(i+2) == 0)  

 return true;  

return false;  

}  

// Driver Program to test above function  

int main()  

{  

isComposite(11)? cout << " true\n": cout << " false\n";  

isComposite(15)? cout << " true\n": cout << " false\n";  

return 0;  

}

Explanation:

3 0
2 years ago
What port number is the well-known port used by web servers to distribute web pages to web browsers?question 3 options:?
stira [4]
This is port 80 for clear-text connections and 443 for encrypted (TLS) connections.
5 0
3 years ago
Which of the statements below is true?
emmainna [20.7K]

The given statement that is true is; B: The Formatting, Standard, and Drawing toolbars are displayed.

<h3>Which statement is true of microsoft word?</h3>

In Microsoft word, there are different toolbars that are useful in operation. Now, from the given image from Microsoft word, we can see that toolbar is clicked. However in the fly-down from it, we see that the standard, formatting and drawing toolbars are ticked and as such they are the ones displayed.

Looking at the options, the correct one is Option B because it tells us that Formatting, Standard, and Drawing toolbars are displayed.

Read more about a true statement at; brainly.com/question/25605883

8 0
2 years ago
// This pseudocode segment is intended to compute and display
Finger [1]

The pseudocode to calculate the average of the test scores until the user enters a negative input serves as a prototype of the actual program

<h3>The errors in the pseudocode</h3>

The errors in the pseudocode include:

  • Inclusion of unusable segments
  • Incorrect variables
  • Incorrect loops

<h3>The correct pseudocode</h3>

The correct pseudocode where all errors are corrected and the unusable segments are removed is as follows:

start

Declarations

     num test1

     num test2

     num test3

     num average

output "Enter score for test 1 or a negative number to quit"

input test1

while test1 >= 0

     output "Enter score for test 2"

     input test2

     output "Enter score for test 3"

     input test3

     average = (test1 + test2 + test3) / 3

     output "Average is ", average

     output "Enter score for test 1 or a negative number to quit"

     input test1

endwhile

output "End of program"

stop

Read more about pseudocodes at:

brainly.com/question/11623795

3 0
2 years ago
Other questions:
  • A client has macular degeneration resulting in moderate visual impairment. The client works as a data entry clerk and wants to c
    15·1 answer
  • What is the difference between HTML and CSS? * 1. CSS is a markup language unlike HTML 2. HTML is a backend technology and CSS i
    7·1 answer
  • Which of the following is not a common network architecture type?
    9·1 answer
  • What function would you use to find the mean in a Microsoft excel document ?
    6·2 answers
  • What are finger nails made of?-
    12·2 answers
  • A(n) ____ uses the communication interface to request resources, and the server responds to these requests.
    15·1 answer
  • Where are methods listed in a UML class diagram showing three parts?
    8·1 answer
  • The use of a concept or product from one technology to solve a problem in an unrelated one
    11·1 answer
  • A data table is a range that displays what?
    15·2 answers
  • What type of platform is SAP?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!