Q1 Write a prog to print this pattern.
a)
1
12
123
1234
Answers
Answered by
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