ICSE Class 10 Computer Applications
Question 18 of 30
Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 23
Back to all questionsBelow is the for loop version of the provided do-while segment:
public class Main {
public static void main(String[] args) {
int x = 10, y = 20;
for (; x <= 20; x++, y++) {
// Body is empty because the increments are in the for loop header
}
System.out.println(x * y);
}
}