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 does playstation charge formy new subscription
BlackZzzverrR [31]
Right when you pay for subscription to PSPlus the timer starts and after 30 days it will end ( if you got the 1 month subscription) This is the same for 3 month and 1 year subscription
3 0
4 years ago
Mention at least five devices used for digitizing data
creativ13 [48]
Answer:
1. Cloud Storage Solutions
2. Digital Communication Tools
3. Cloud ERP Systems
4. CRM Platforms
5. Digital Accounting Tools

For more information, please visit: https://www.gend.co/blog/the-digitisation-tools-with-the-biggest-impact-for-business?hs_amp=true

Hope this helps!!
3 0
2 years ago
Which of the following is one of the first steps in implementing a comprehensive security program? Setting up a Guest account Cr
yKpoI14uk [10]

Answer:

Setting a strong password policy

Explanation:

In implementing a comprehensive security program, one of the first steps would be to set up a strong password policy.

It is important to understand what the company is trying to protect from third parties.

Setting up a password policy is going to increase the security of the system through the use of strong passwords.

5 0
3 years ago
What does anti-malware software look for to determine that a program or a process is a virus?
Kryger [21]
Certain extensions of files. Sometimes, the name of the file could be something like Trojanx64.sys(I think). I had a few files of malware, but they were deleted. I believe the most common extension is .sys for viruses. Additionally, antivirus software could look into the properties of the program/process.
3 0
3 years ago
A pen testing method in which a tester with access to an application behind its firewall imitates an attack that could be caused
sweet [91]

Answer:

a. True

Explanation:

The statement that a pen testing method or penetration test in which a tester who has a means of entry to an application behind its firewall imitates an attack that could be caused by a malicious insider.

A penetration test, which is also refer to as a pen test, pentest or ethical hacking, is an approved simulated cyberattack done on a computer system, performed in order to evaluate the security of the system. The test is carried out to identify both weaknesses or vulnerabilities including the potential for unauthorized parties to penetrate to the system's features and data.

The main purpose of performing this test is to identify any vulnerability in a system's defenses which attackers may take advantage of.

6 0
3 years ago
Other questions:
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • Which type of attack is one in which a rogue wireless access point poses as a legitimate wireless service provider to intercept
    10·1 answer
  • One way to describe the note-taking tool eNotes is to call it an<br> Someone help ._.
    9·2 answers
  • If a user wants to change one small section of the formatting of a document and leave the rest the same, which process should be
    14·1 answer
  • Standards for all managers ethical responsibilities are covered in a company's
    7·2 answers
  • Which field data type would you use if you'd like to store videos in that field a text b memo c Boolean D binary object E null
    11·2 answers
  • The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create
    10·1 answer
  • Which is the largest unit of measurement for computer data?
    14·1 answer
  • Considering current online newspaper editions and the characteristics of digital age media, how do you think newspaper design mi
    7·1 answer
  • Write a calculator program using a switch statement that: a) Prompts the user to enter two numbers b) Prompts the user to select
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!