give the program of Java the same is 1,12,123,1234
Answers
Answered by
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();
}
}
}
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
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();
}
}
}
{
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