Need some help!

I have two programs to write and haven't the slightest idea how to do either of them! Any help would be greatly appreciated!
1. Write a program that when a user enters an integer the program will
display all the digits from the lowest position to the highest.
For example, if a user enter 54675873, the program will display
3
7
8
5
7
6
4
5
Note:
1. The program is not aware of how many digits the input has.
2. Use modulo operator to extract each digit.
3. Use while-loop. Think about how to set up the condition when
the loop stops.

2. Fibonacci sequence is the sequence of integers that starts with 0 and 1
and each subsequent number is the sum of the previous two.
0, 1, 1, 2, 3, 5, 8, 13, 21, ...
Write a program to find the 48th number in the sequence.
Use for-loop in your program
Homework...?

Okay, the instructions lay it out pretty well (tell us what you are stuck on, then we can help you in an effective manner): <-- Not a frowny face

1.
a) You have to use a while loop to run the program until each digit is extracted and printed to the screen.
b) To extract each digit, you must use the modulo operator (%) which returns the remainder of a division (5 % 2 = 1)
c ) Print, in reverse order, the digits of the number (each on a new line?)

2.
a) Use a for loop to find (and print? It would seem a little illogical to not display the result) the 48th number in the Fibonacci sequence.
Topic archived. No new replies allowed.