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
When you sit for a typing test, what is the first thought that crosses your mind?
MaRussiya [10]
<span>When you sit for a typing test, what is the first thought that crosses your mind?
posture</span>
8 0
3 years ago
Read 2 more answers
Write a method called consecutive that accepts three integers as parameters and returns true if they are three consecutive numbe
Andre45 [30]

Answer:

#include <iostream>

using namespace std;

void swap(int *a,int *b)

{

   int temp;

   temp=*a;

   *a=*b;

   *b=temp;

}

bool consecutive(int k1,int k2,int k3)

{

   int arr[]={k1,k2,k3};  //storing these variables into an array

   int i,j;

   for(i=0;i<3;i++)

   {

       for(j=i;j<3;j++)

       {

           if(arr[i]>arr[j])

           {

               swap(arr[i],arr[j]);  //swapping to sort these numbers

           }

       }

   }

   if((arr[1]==arr[0]+1)&&(arr[2]==arr[0]+2))  //checks if consecutive

       return true;

   else

       return false;

}

int main()

{

   int result=consecutive(6,4,5);   //storing in a result variable

   if(result==0)

       cout<<"false";

   else

       cout<<"true";

   return 0;

}

OUTPUT :

true

Explanation:

In the above code, it stores three elements into an array and then sorts the array in which it calls a method swap() which is also defined and interchanges values of 2 variables. Then after sorting these numbers in ascending order , it checks if numbers are consecutive or not, if it is true, it returns true otherwise it return false.

7 0
3 years ago
State and explain 5 importance of ICT in an organization​
gogolik [260]

Answer:

Explanation:

ICT simply refers to Information technology and it is the digital technologies used in various sectors to help economic agents make use of information.

The importance of ICT include:

1. Communication: ICT is vital for communicating in organizations as information are spread faster and employees have quicker access to information.

2. Marketing and Sales: ICT is vital for the marketing of products as products can be advertised on social medias etc.

3. Efficiency and effectiveness: There's efficiency and effectiveness on the part of the organization as the needs of the customers are attended to quickly.

4. Improvement in management decision: ICT is also vital in the enhancement of management decisions.

5. It is also vital is the storage of vital data's in the organization.

5 0
3 years ago
You receive an email from your school's head of IT. There is a concern for a potential hack to the school's servers. IT knows so
creativ13 [48]

Answer:

a.) This could be a phishing attempt. If the situation is as described in the email, this is also serious, but the method suggested is the same methods used by social hackers. Look up your IT Departments; phone number and call them about the email.

Explanation:

This makes sense because many people do these types of scams to trick people into logging into their accounts and actually hack them from there, I actually got an email like this last week to my iCloud address. Make sure that the email actually came from the IT department by checking the domain the email comes from, and call the IT department to make sure.

Hope this helps!

5 0
3 years ago
When you park on a hill, think about which way _____.
Vinil7 [7]

I don't see why this is on a computer section but either way I would chose D because naturally when you park on a hill you would be cautious about your car going into motion down the hill so therefore you would think of which way gravity would pull your vehicle

7 0
3 years ago
Read 2 more answers
Other questions:
  • A _____________ is some text or data that is stored on your computer and used by a website to track how you use that site. quest
    8·2 answers
  • Which topology connects all the computers in a circular pattern
    13·2 answers
  • Dave is a recruiter for a large video and animation firm. He is looking for an employee who is willing to give productive hours
    7·1 answer
  • What are the primary functions of motor oil? a. Reduce friction and prevent wear b. Keep engine surfaces clean c. Remove heat to
    11·1 answer
  • Why you think Operating System is pivotal in teaching and learning.
    13·1 answer
  • People are not interested in what you do _____. I think, more and more, they're not even really interested necessarily in how yo
    8·1 answer
  • You have a network of ten computers connected to a single switch that has 12 ports. You need to add six more computers to the ne
    12·1 answer
  • Using the phase plane program described in the introduction, plot the phase plane for the Lotka-Volterra model Here represents t
    8·1 answer
  • Anna's computer has slowed down. How might she improve her computer's performance? Select one of the options below as your answe
    10·1 answer
  • Name two devices that use control knobs to set the level of gadget​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!