Computer Science, asked by vvineet93, 2 months ago

Write programs using nested loops to produce the following patterns
2
44
666
8888​

Answers

Answered by kamalrajatjoshi94
2

Answer:

public class Pattern

{

public static void main(String args[ ])

{

int a,b;

for(a=2;a<=8;a=a+2)

{

for(b=1;b<=a;b++)

{

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

}

System.out.println();

}

}

Output:

2

4 4

6 6 6

8 8 8 8

Type this program you will get the result.

Similar questions