2 24 246 2468 pattern programin
Attachments:
Answers
Answered by
1
2 4 6 8 10................
Abhijeetroy:
hii
Answered by
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