ICSE Class 10 Computer Applications
Question 66 of 76
Revising Basic Java Concepts — Question 70
Back to all questions 70
Question Question 47
Write a program that prints the squares of 10 even numbers in the range 10 .. 100.
public class KboatSquares
{
public static void main(String args[]) {
System.out.println("Squares of even number:");
System.out.println("Number\tSquare");
for(int i = 10; i < 30; i += 2) {
int sq = i * i;
System.out.println(i + "\t" + sq);
}
}
}Output
