Computer Science, asked by priyanshu24439, 1 year ago

give the program of Java the same is 1,12,123,1234

Answers

Answered by nitish8089
2
program for this pattern
public class Program
{
public static void main(String[] args) {
for(int i=1;i<=4;i++){
for(int j=1;j<=i;j++){
System.out.print(j);}
System.out.println();
}
}
}
Answered by sakshamrai8
1
class pattern1
{
public static void main(String arg[])
{
int i, j;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
System.out. print(j);
}
System. out. println();
}
}
}
Similar questions