Computer Science, asked by dsdwkarunarathna9811, 11 months ago

Write java program for loop 2 4 6 8 10 12 14

Answers

Answered by salonidarji2004
1

logic is 2n

public class Series

{

public static void main()

{

int n = 5;

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

{

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

}

}

}

follow me

hope it helps

mark it as brainliest

Answered by tavishvohra4
0

Explanation:

public class num

{

int t;

public void display()

{

for(t=2;t<=14;t+=2)

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

}

}

Similar questions