An algorithm is a sequence of steps that describe what a program should do. It is normally written before the program. So, if you can describe step by step what this program does, that is the algorithm. It is not rocket science. Just tell us what you think this program does, in point form. Since this is a small program, you may have to be explicit.
For example.
Step 1 - Declare an integer variable int
Step 2 - Display "Enter age"
Step 3 - ....
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115