Computer Science, asked by kdidjmekd, 10 months ago

2 24 246 2468 pattern programin​

Attachments:

Answers

Answered by vanshita77
1

2 4 6 8 10................


Abhijeetroy: hii
vanshita77: Hlo
Abhijeetroy: how r u
vanshita77: fine
Anonymous: no chats here!
Answered by chowdhurymita49
11

Answer:

public class Patten

{

public static void main (String args[ ])

{

int n = 8;

for(int i = 2;i<=n;i+2)

{

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

{

System.out.print(+j);

{

System.out.println();

}

}

Explanation:

Here we use integer I to run the outer loop to print the number of lines the pattern will be printed and in j we run the inner loop in which we determine the lines of the pattern mentioned.

Similar questions