Computer Science, asked by taha100, 3 months ago

WAP to print cubes of first 10 even numbers of the heavens​

Answers

Answered by Enrique001
2

Answer:

class A

{

public static void main(String args[ ])

{

int a=0,i=1, sum=0;

//METHOD 1

System.out.printl( 2,4,6,8,10,12,14,16,18,20);

//METHOD 2

for(i=1;a<=10;)

{ if (i%2==0)

{System.out.println(i)

a=1+a;

}

i=i+1;

}

}

}

Hope it helps. Follow for more answers.

Similar questions