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
alexandr1967 [171]
2 years ago
11

Class Main {

Computers and Technology
1 answer:
Ganezh [65]2 years ago
4 0

Answer:

class Main {

 static void printPowers(int howMany, int nrRows) {

   for(int n=1; n<=nrRows; n++) {

     for(int power = 1; power<=howMany; power++) {

       System.out.printf("%d ", (int) Math.pow(n, power));

     }

     System.out.println();

   }

 }

 public static void main(String[] args) {

   printPowers(3, 5);

 }

}

class Main {

 static void printPowers(int howMany, int nrRows) {

   int n = 1;

   do {

     int power = 1;

     do {

       System.out.printf("%d ", (int) Math.pow(n, power));

       power++;

     } while (power <= howMany);

     System.out.println();

     n++;

   } while (n <= nrRows);

 }

 public static void main(String[] args) {

   printPowers(3, 5);

 }

}

Explanation:

The for loop gives the cleanest, shortest code.

You might be interested in
How can parents be health educators in family​
Fudgin [204]

Answer:

They can be health educators in family because they are your parents.

Explanation:

The reason why is because since they are your parents that means they have kids, so they probably know the ins and outs of parenting and running a family.

7 0
3 years ago
A(n) ____________ for a computer program is a set of steps that explains how to begin with known information specified in a prob
Viefleur [7K]

Answer:

​algorithm

Explanation:

A(n) ​algorithm for a computer program is a set of steps that explains how to begin with known information specified in a problem statement and how to manipulate that information to arrive at a solution.​

4 0
3 years ago
Withdrawal from a conflict is best used when ______.
Liono4ka [1.6K]

Answer:

Neither side can reach an agreement

Explanation:

i just took the test

6 0
3 years ago
Read 2 more answers
An interactive online representation of geospatial data, which can be accesses via a Web browser is a(an): a. Web Application b.
Mashcka [7]

Answer: Web Map

Explanation:

7 0
2 years ago
What are the first steps that you should take if you're unable to get onto the internet
zhenek [66]

Answer:

See below

Explanation:

  • Check the physical connections first.
  • Ethernet cable to PC and or router, and power cable / power status.
  • Next try to reboot the router and check lights status.
  • If everything is fine on your end then contact your internet provider to further troubleshoot on their end.
4 0
4 years ago
Read 2 more answers
Other questions:
  • A ________ is when teachers develop a professional based network of people selected by him/her to pursue learning needs and shar
    12·1 answer
  • What are the functions of a motherboard??
    6·1 answer
  • Suppose the length of each packet is L bits. Also, assume the path from a server to a client includes N links each of rate R (i.
    8·1 answer
  • Why is it important to use correct posture while typing
    7·1 answer
  • If Phil is putting exact phrases in quotation marks while searching for information, he's using which of the following?
    14·1 answer
  • Write a single if-test using Boolean operators and relaional operators to determine if a double variable x is between zero (excl
    11·1 answer
  • Who knows coding questions? Please help! Thanks.
    6·1 answer
  • I need help with getting a profile pic
    5·1 answer
  • Write a program that displays the average temperature and the annual precipitation for a selected city. The user should be able
    10·1 answer
  • Which of these is NOT an input device?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!