Computer Science, asked by estherjoseph4003, 21 hours ago

Write a python program to print the following pattern of n numbers.e.g. if n=3 then,
1=1
1+2=3
1+2+3=6
',

Answers

Answered by tungkishore
0

Explanation:

public class KboatPattern

{

public void displayPattern() {

int a = 1;

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

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

System.out.print(a++ + "\t");

}

System.out.println();

}

Similar questions