Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   C++ (http://www.domainnameforum.org/forumdisplay.php?f=123)
-   -   Hailstone numbers help (http://www.domainnameforum.org/showthread.php?t=128752)

C++ 10-06-2010 12:16 AM

Hailstone numbers help
 
Ok so i have to write a program called hailstone numbers. Its basically asking the user to enter a number and if its even divide it by 2, if its odd multiply it by 3 and add 1 and then output the number of iterations. I made my program but I have a problem. The series keeps going and doesn't stop....


All times are GMT -4. The time now is 11:34 AM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.