Write a program that prints the following 45 pairs of numbers:11
21
22
31
32
33
41
42
43
44
51
***
97
98
99
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.

Answers

Answer 1
Answer:

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

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

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}


Related Questions

Suppose that each country completely specializes in the production of the good in which it has a comparative advantage, producing only that good. Inthis case, the country that produces rye will produce million bushels per week, and the country that produces jeans will producemillion pairs per week.
What is this car first to awnser is the brianliest
Obtain the 9’s complement of the following eight-digit decimal numbers:1234987689009951
What component can be used for user input or display of output?JButtonJLabelJTextFieldJFrame
Consider the method total below:public static int total (int result, int a, int b){ if (a == 0) { if (b == 0) { return result * 2; } return result / 2; } else { return result * 3; }}The assignment statementx = total (1, 1, 1);must result in:A. x being assigned the value 3 B. x being assigned the value 7C. x being assigned the value 5D. x being assigned the value 2E. x being assigned the value 0

1. (1 pt) Suppose you wish to run a program P with 37.5 x 109instructions on a 15 GHz machine with a CPI of 0.75. What is the expected CPU time to execute this program on this machine

Answers

Answer:

Expected CPU time: 1.875 seconds.

What is copyright and what are your thoughts on it?

Answers

It’s a type of property marking that gives an owner the right to copy creative pieces/work. I think that it makes life easier

Answer:

Copyright is a type of intellectual property that gives its owner the exclusive right to make copies of a creative work.

Explanation:

DASD stands for ____________? Direct access storage device? Direct application storage device? Diverse access storage device

Answers

Direct Access Storage Device

Answer:

Direct access storage device.

Explanation:

DASD stands for direct access storage device.

Which is an example of an operating systema
Adobe Photoshop

b
Internet Explorer

c
Windows

d
Microsoft Word

Answers

Answer:

windows

Explanation:

Examples of Operating Systems

Some examples include versions of Microsoft Windows (like Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP), Apple's macOS (formerly OS X), Chrome OS, BlackBerry Tablet OS, and flavors of Linux, an open-source operating system.

In open addressing with linear probing we must consider how to encodeA. Occupies positions

B. Available positions

C. All other answers

D.empty positions

Answers

Answer: B)Available positions

Explanation:Open addressing is the addressing method for the components that are present in the hash table. collision are controlled and managed by this process. The total count of keys is less or equal to the size of table.

Linear probing is the mechanism that helps in controlling of the collision happening by the process of key collection maintenance by encoding of the available positions of the element in the hash table.So,the correct option is option(B).

what would be the address of the cell, which is intersect of the second row and third column in a worksheet

Answers

Answer: The address of the cell is C2

Explanation:

In a worksheet like Microsoft Excel, there are rows and columns. It tags rows with numbers and tags columns with alphabet letters. For example, the first row is 1, the second row is 2, the third row is 3, and so on. Similarly, the first column is A, the second column is B and so on.

We want to know the address for the intersect of the second row i.e. 2, and the third column i.e. C in a worksheet. In other words, it might intersect column C and row 2.

A cell is a box where a row and column intersect. The address of the cell starts with the column, and next there is the row. In that case, we can conclude that the address of the cell is C2.

C2 or B3. This is if you are talking about Microsoft Excel.