A Small Program that Doubles Itself

I wrote a small program that copies itself. When the program doubles itself it executes itself twice. The code that doubles itself is now doubled. The second time you run it you will get 8 times its original copy. The following time it’s going to double 8 copies of itself 8 times. Afterwards it doubles 2048 copies of itself 2048 times — that I can’t run because it would overwhelm the universe 5 times!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s