Project Euler #3 BAD Pseudocode

I’m a firm believer that if you’re having a problem writing your code, it is because you wrote bad pseudocode. Maybe it didn’t have enough detail or a bad layout. Or maybe I … I mean you … you just don’t know what you are doing. I bring this up because I wasted three hours last night trying to write this program in C++.

I got the prime checking function down fine but when it came to the factorization … I kept trying to do all the wrong things. I didn’t even get into how to store and verify the factors.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.