Question: 1. Write a class public class Counter { public static void main( String [ ] args ) { // YOUR CODE HERE } } whose

1. Write a class

public class Counter {

public static void main( String [ ] args ) {

// YOUR CODE HERE

}

}

whose main method prints the following 45 pairs of numbers:

1 1

2 1

2 2

3 1

3 2

3 3

4 1

4 2

4 3

4 4

5 1

9 7

9 8

9 9

Note that the first numbers go from 1 to 9, and the second numbers start at 1 and go up to the value of the first number (9 times). You must use loops to do this not 45 print statements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!