I'm trying to figure out how does simple Bitcoin mining algorithm works in plain simple c or c# or some pseudo language. I've found an example at http://pastebin.com/EXDsRbYH, but unfortunately It isn't clear what it does. I was unable to run it.
Suppose I have only one input: a Bitcoin wallet "abc..." which I would like to be used for the Bitcoins to be mined. I need simple to understand algorithm that will do the bitcoin mining on one machine with one thread on one cpu [I know it will take ages to complete :)]