Math, asked by sutsav042, 4 months ago

Q1 Write a prog to print this pattern.
a)
1
12
123
1234​

Answers

Answered by Aneswak
0

Step-by-step explanation:

In Java,

for (int i=1;i<=4;i++)

{

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

System.out.print(j+ " ");

System.out.println();

}

In Python,

for i in range(1,5)

for j in range(i)

print(j+1," ")

Similar questions