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
kkurt [141]
3 years ago
10

Implement a function named largerThanN that accepts three arguments: an array of type int, the size of the array of type int and

an int number n. The function should display all of the numbers in the array that are greater than the number n. in the main() function create an array named numbers containing 10 integers : 30,20,50,2,-1,44,3,12,90,32 Ask the user to enter a number. Call the the function largerThanN and pass the array , the size and the number that user entered.
Computers and Technology
1 answer:
levacccp [35]3 years ago
6 0

Answer:

import java.util.Scanner;

public class NewArray {

//Main Method begins here

   public static void main(String[] args) {

   int [] numbers = {30,20,50,2,-1,44,3,12,90,32}; //The given array

   Scanner in = new Scanner(System.in);

       System.out.println("enter a number");

       int n = in.nextInt(); //Receive the number from the user

       //Calling the method largerThanN

       largerThanN(numbers, numbers.length,n);

   }

//The method largerThanN begins here

   public static void largerThanN(int []intArray, int arraySize, int n){

       for(int i = 0; i < intArray.length; i++){

           if(intArray[i] > n){

               System.out.println(intArray[i]);

           }

       }

   }

}

Explanation:

Uisng the Java prograamming language the solution is provided above.

Please see the comments within the code for detailed explanation

The key logic within the method largerThanN () is using a for loop to iterate the entire array. Within the for loop use an if statement to compare each element with the the number n entered by the user

You might be interested in
When activated, an Excel object has all the features of an Excel ______?
erik [133]

<span>Workbook is the answer. An excel object (collectively referred to as </span>the Excel Object Model) refers to the objects that comprise an Excel workbook, such as Worksheets, Rows, Columns, Cell Ranges, and the Excel Workbook itself.

 

<span>When activated, an Excel object has all the features of an Excel workbook.</span>

3 0
3 years ago
Read 2 more answers
1. Light of wavelength 900x10-9 m is emitted by a source. What is its frequency?​
andrezito [222]

therefore the frequency = 6×10^14

7 0
3 years ago
Defeating authentication follows the method–opportunity–motive paradigm.
sashaice [31]

Answer:

Method:- This is related to hackers technique and way of accessing to copy other data. It also includes the skill, knowledge, tools and other things with which to be able to pull off the attack.

Opportunity:- this is related to how a user gives way to access to the hackers. It includes the time, the chance, and access to accomplish the attack.

Motive:- This may relate to the hacker to destroy the reputation of another or for money. It is reason to want to perform this attack against this system

3 0
3 years ago
A computer equipped with fingerprint recognition software, which denies access to a computer to anyone whose fingerprint is not
morpeh [17]

Answer: C. It is not possible for any top computer hacker to gain access to a computer equipped with the recognition software solely by virtue of skill in replicating the structure of fingerprints

Explanation:

Option A is incorrect. There's no information on the speed and analysis of the fingerprint.

Option B is incorrect. No information regarding computer installation was given in the passage.

Option C is correct. With the information, it can be concluded that it is impossible for a top hacker to have access to the protected computer.

Option D is Incorrect. Information regarding time and investment costs that were incurred during the software development wasn't given in the passage

Option E is Incorrect. The passage didn't give information on the errors that the software produced.

8 0
3 years ago
How would you create a tint of a color?
svetlana [45]
D. white with a hue
HOPE THIS HELPS
5 0
3 years ago
Other questions:
  • Using Python
    14·1 answer
  • Which of the following is a key component to your individual internet safety? government regulations
    13·1 answer
  • 2. A body is thrown vertically<br>100 m/s Theme taken to retum​
    13·1 answer
  • Which software product release category is "generally feature complete and supposedly bug free, and ready for use by the communi
    7·1 answer
  • Which term collectively describes hard disks, CDs, and flash drives?
    11·2 answers
  • to edit text boxes in a template, first A click on the text box you want to edit B begin typing C format the front D drag the te
    5·2 answers
  • Different network devices function at different network communication layers, depending on their purpose. Using the TCP/IP model
    5·1 answer
  • What is single user operating system? Write two examples.​
    12·2 answers
  • (14) Click on the
    7·2 answers
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!