I understand getting the logic to go from 1 to 10 but I can not understand 10 to 1. Any help would be great.
??????Design the logic for a program that prints numbers in reverse order from 10 down to 1.
information on how to write pseudocode in decreasing order.
Started by dav4life, Sep 03 2010 06:40 AM
4 replies to this topic
#1
Posted 03 September 2010 - 06:40 AM
|
|
|
#2
Posted 03 September 2010 - 06:42 AM
erm,
let x = 10 while (x > 0) print x let x = x -1 end while??
#3
Posted 03 September 2010 - 06:47 AM
just to let you know I am very basic here so if I ask a question and it may be stupid, just bare with me. The erm, couldn't I also name it num? And my flowchart would show this cycle because x > 0
#4
Posted 04 September 2010 - 01:37 AM
I would rephrase that last sentence. Was there a question in there?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 07 September 2010 - 11:20 PM
for x=10 downto 1 do
print x;
print x;


Sign In
Create Account

Back to top









