algorithm to print the digits in the correct order
- by Aga Waw
I've been trying to write an algorithm that will print separately the digits from an integer. I have to write it in Pseudocode. I know how to write an algorithm that reverse the digits.
digi(n):
while n != 0:
x = n % 10
n = n // 10
print (x)
But I don't know how to write an algorithm to print the digits in the correct order.…