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 do most database users perform data searches?
defon

Answer:

by using forms

Explanation:

Most of the database users perform the data searches by using the forms. A form can be used to enter, edit and display the data from the data source. Its a user interface in fact that fetches the data from the database. Reports have used the display the data for a certain type of user, and the viewing table does not look feasible to search from a very large database, and the databases are usually large. No calculation is required for searching the data, and we only need to write queries in the right syntax. Hence, here the correct option is by using forms.

7 0
3 years ago
While the Internet can be a great resource, the information is not always reliable, as anyone can post information. Select one:
Olin [163]

Answer: True

Explanation: Because anyone can post something and it can be non reliable

7 0
3 years ago
Assume that grade is a variable whose value is a letter grade-- any one of the following letters: 'A', 'B', 'C', 'D', 'E', 'F',
d1i1m1o1n [39]

Answer:

switch (grade) {

 case 'A':

   acount++;

   break;

 case 'B':

   bcount++;

   break;

 case 'C':

   ccount++;

   break;

 case 'D':

   dcount++;

   break;

 case 'E':

   ecount++;

   break;

 case 'F':

   fcount++;

   break;

 case 'W':

   wcount++;

   break;

 case 'I':

   icount++;

   break;

}

Explanation:

6 0
3 years ago
Example of personal professional highlights of styles of communication
tankabanditka [31]
Mediocre skills required.
4 0
3 years ago
Victoria turned in a rough draft of a research paper. Her teacher commented that the organization of the paper needs work.
Katarina [22]

Answer:

D

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • The highly advanced decision support feature integrated within an electronic information system would support which activity?
    9·1 answer
  • Typically, a dvd has how many times more capacity than a cd?
    5·1 answer
  • Preesure is drived quantity? why​
    15·2 answers
  • Citing the recent increase in earnings by several computer companies, economists feel that a cycle has begun in which personal c
    13·1 answer
  • What term is defined as private data placed in a packet with a header containing routing information that allows the data to tra
    13·1 answer
  • 12. When trying to identify the sorted column in a table, you would look for the column where A. an arrow is displayed in the fi
    10·2 answers
  • Como se diseña y produce un material audiovisual
    5·1 answer
  • Preciso de ajudar para resolver esse exercício, é para amanhã cedo!!<br><br> Em Dev C++
    12·2 answers
  • What will the following program display in the console?
    12·1 answer
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!