Write a program in Java to generate the cube of first ten even numbers using While () loop.
Answers
Answered by
4
Answer:
public class Main
{
public static void main(String[] args)
{
int i=1,n=0;
while(n<10)
{
if(i%2==0)
{
System.out.println(i*i*i);
n++;
}
i++;
}
}
}
Explanation:
HOPE IT HELPS YOU
DO FOLLOW FOR MORE PROGRAMS
MARK AS BRAINLIEST
//OUT PUT IS ATTACHED LOOK AT THAT
Attachments:

Similar questions
English,
3 months ago
Math,
3 months ago
Social Sciences,
6 months ago
Math,
11 months ago
English,
11 months ago