The best way to learn algorithm is I think, to work it out in your khata....
At first, I also emphasised on writing the entire program...but what is more essential is to understand writing the algorithm....the other parts will come automatically...
Just as xpi0t0s said...what will you do if you are not provided with a pc, just a notebook, a pen and you have been asked to draw a flow-chart of the key algorithm.

Note that in the first program, the key algorithm is to distinguish the digits of a number....now how many ways can you do that.....draw all the possible flow-charts...and always stay greedy of drawing one more...then I think it will be perfect.

Similarly, try to find out what the other key algorithms are in the remaining programs.