It runs, but sometimes freezes while checking numbers nearby 50, 250, and 450. Even stranger, I input 100, got a glitch; I tried again, and it ran right through. Do I have pointer issues? Math issues? Visual Studio issues?
Code below (I've left line 23 uncommented so you can see where it freezes while running.)