Computer Science, asked by apstrike2000, 11 months ago

How do I solve this question in Java.
1
22
333
4444
55555

Answers

Answered by amannishad0512p5zxh6
2

class pattern

{

public static void main ( String args [ ])

{

int i,j;

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

{

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

{

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

}

System.out.println("");

}

}

}

By this way,you solve this program and print it.

For more java doubts follow me and Mark me brainlest.

Answered by sswaraj04
1

Answer:

public class pattern

{

public static void main ( String args [ ])

{

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

{

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

{

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

}

System.out.println("");

}

}

}

Explanation:

Hope it helps:-)

Similar questions