Which of the following will count down from 10 to 1 correctly?

a. for (int j = 10; j <= 1; j++)
b. for (int j = 1; j <= 10; j++)
c. for (int j = 10; j > 1; j--)
d. for (int j = 10; j >= 1; j--)

d. for (int j = 10; j >= 1; j--)

Computer Science & Information Technology

You might also like to view...

Given the infix expression (( a + b) * c Convert it to a prefix expression.

What will be an ideal response?

Computer Science & Information Technology

Evaluate this prefix expression: * 4 – 5 6

What will be an ideal response?

Computer Science & Information Technology