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
Serhud [2]
3 years ago
15

Complete the method, print Multiples(), that takes in a positive integer n, and another positive integer, max. Print out all the

multiples of n that are less than or equal to max. Print each multiple on a separate line. For example, if the method is called with n
Computers and Technology
1 answer:
musickatia [10]3 years ago
3 0

Answer:

public static void printMultiples(int n, int max){

    for (int i=1; i<=max; i++){

        if(i%n == 0)

            System.out.println(i);

    }

}

Explanation:

Create a method called printMultiples that takes two parameters n and max

Inside the method, create a for loop that iterates from 1 to max. If i, a number between 1 and max, % n is equal to 0, that means the number is a multiple of n, print the number.

You might be interested in
How is an interpreter different from a compiler?
lyudmila [28]

Answer:

An interpreter is quite different from a complier due to the following statement below:

O. An interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.

Explanation:

For an interpreter, it works in translating and execution of the codes line after another line. In a situation where there is a mistake in the code, the next line would not be able to be executed, but rather display error message. On the other hand, compiler translate all codes at once and execute them as a single work.

<em>During its translation of the codes in compiler, should there be any error, it would not be able to execute despite the fact that, the error might be in the last line of the code.</em>

7 0
3 years ago
Read 2 more answers
Gps receivers are commonly used by individuals to determine their geographic location while hiking and to obtain driving directi
soldier1979 [14.2K]
I think it is true also.
7 0
3 years ago
You are responsible for creating a shared file system to support a new branch office. The manager has requested shared locations
Natalija [7]

Answer:

Hey do u hve zoo m app??......

5 0
3 years ago
You are asked to write an app to keep track of a relatively small music library. The app should load song information from a dat
gogolik [260]

Answer:

C++ PROGRAM

Explanation:

6 0
3 years ago
A favorite pastime of information security professionals is ____, which is a simulation of attack and defense activities using r
GenaCL600 [577]

Answer:

war gaming

Explanation:

Wargaming in hacking is a cyber security challenge where competitors must exploit or defend a loophole/vulnerability in a system or application or gain or prevent access to a particular computer system, it is in a form of competition but it really helps them in securing systems/application when it arises.

5 0
3 years ago
Other questions:
  • 1. What are the biggest risks when using the public Internet as a Wide Area Network (WAN) or transport for remote access to your
    6·1 answer
  • An iphone is a form of a computer
    7·2 answers
  • Which wireless communication is typically limited to six feet of distance?
    6·1 answer
  • Yesterday you installed a new game on your computer. When you ran the computer, you noticed that the application was running ver
    10·1 answer
  • How many pieces can be connected on to a to an SPS​
    11·1 answer
  • Sally types documents that have a few numbers but mostly letters. To enter these numbers, she should use the
    12·1 answer
  • When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do
    7·1 answer
  • Which of the following statements is true of San serif fonts?
    12·2 answers
  • Select all the correct answers.
    13·2 answers
  • What does it mean to clear a setting in a dialog box?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!