Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

Write a Java program to print numbers from 10 to 20 in descending order using a For Statement.

OpenStudy (anonymous):

what have you worked out so far?

OpenStudy (anonymous):

I dont understanfd it at all.

OpenStudy (anonymous):

I dont understanfd it at all.

OpenStudy (anonymous):

do you know what a for loop is?

OpenStudy (anonymous):

Cdw, break down the task into parts: -You need to do something repeatedly. In this case, it's printing numbers (using a "for" loop) -You need to change the number as you do this (subtraction) -You know your bounds, aka "start" and "end" (20 and 10, respectively) So you need to write code that starts a variable at 20, then prints it, then subtracts one to get 19, then prints that, then subtracts to 18, prints that, and so on. The for-loop syntax has much of this built into it.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!