May 10, 2024, 05:10:23 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Tricky logical problem and donation

Started by carpman2007, March 08, 2009, 05:00:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

carpman2007

March 08, 2009, 05:00:03 PM Last Edit: September 30, 2010, 09:23:56 AM by Larry McCaughn
Hello everyone,

Here's a little program I'd like to submit (attached to this post in a ZIP archive).

It doesn't really do anything special other than solve a specific logical problem, but it's kind of neat.  My coworker needed to write a program to do this for his C++ class that he's in, and he wasn't sure how to go about it, so he asked me for help.  It drove us crazy, but eventually we came up with a solution, and I admit we got a push in the right direction with a hint that was provided to us by someone on the MSDN forums.

What's interesting is that he (my coworker) was restricted from using methods that they hadn't discussed in class yet, such as arrays and things like that -- the problem HAD to be solved using only loops and basic math operations.

So, happy programming to all!