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
. A program that can run more than one thread at once is called:
kap26 [50]

Answer: Multithreaded

Explanation: Multithreaded program is the program that has the capability of supporting multiple execution through one thread. The multiple execution through single thread refers to the instructions that can take place simultaneously in a sequence manner.

Every instruction in the execution is provided with their own control unit which helps in flow control.Individual execution flow that takes place in sequence of instruction is called threads

8 0
3 years ago
Which of the following is a common financial aid scam that students sometimes find on the Internet? Grant and scholarship databa
allsm [11]

Which of the following is a common financial aid scam that students sometimes find on the internet?

All of the above.

6 0
3 years ago
Read 2 more answers
You have to calculate the total amount you spent at the mall today. Which function should you use to do so?
rosijanka [135]
If it has to be exactly then C-sum
3 0
3 years ago
Read 2 more answers
The negotiators past relationship will affect current behavior if the parties
denis-greek [22]

A. if they have been previously competetive

6 0
3 years ago
Who has pad let and wants to talk
vredina [299]

Answer:

I do.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Why is it difficult to enforce laws against intellectual theft?
    10·1 answer
  • So when i try to click on an assignment to answer it the ask a question thing pops up and i can't exit out of it. I've tried rel
    10·2 answers
  • An office employee working in a payroll department uses a customized program to log hours employees have worked. The customized
    12·2 answers
  • In which step of web design is storyboarding helpful?
    14·1 answer
  • When entering a expressway using a weave lane you must do what
    7·1 answer
  • Which operating system user interface does not reside on the computer but rather in the cloud on a web server?
    5·1 answer
  • Please help ASAP!
    5·1 answer
  • I am stuck on these 2 questions. Can someone help me please?
    10·1 answer
  • Write a method that accepts an integer argument and returns the sum of all the integers from 1 up to (and including) the number
    14·1 answer
  • What is the purpose of heading tags?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!