Asked by Marc
Design the pseudocode for a program that allows a user to enter 10 numbers, then displays them in the reverse order of their entry
Answers
Answered by
Steve
for i=1 to 10
read n[i]
for i=10 to 1 step -1
print n[i]
Or, if you don't like counting down,
for i=1 to 10
print n[11-i]
or, depending on the language, the array may be 0-based, but you can allow for that.
read n[i]
for i=10 to 1 step -1
print n[i]
Or, if you don't like counting down,
for i=1 to 10
print n[11-i]
or, depending on the language, the array may be 0-based, but you can allow for that.
Answered by
moniquu
Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the numeric average of the numbers entered.
There are no AI answers yet. The ability to request AI answers is coming soon!