ICSE Class 8 Computer Studies Question 5 of 10

Decision Control Structure — Question 1

Back to all questions
1
Question

Question 1

Radhika is writing a program in Java to print her name 10 times. Suggest her the appropriate condition for the same.

Answer

Radhika can print her name using a for loop in Java like this:

for (int i = 1; i <= 10; i++) {
    System.out.println("Radhika");
}