Search found 2 matches

by Chamak
Mon Feb 17, 2003 9:37 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318270

Thnx u alL

One thing I didn't mentioned that i m new in here ... i may do donkey like mistakes :lol: , whatever thnx for helping me but still 1 thing i can't get is till when i'll take the inputs ???? again thnx all of you.....good day :wink:
by Chamak
Fri Feb 14, 2003 9:34 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318270

3n+1

I don't understand why it's telling wrong answer when i m submitting :cry: can anyone help me please ??????
here is the hole program :


#include<iostream.h>
int count=0,temp=0;
int cycle(long unsigned int n)
{
if (n==1) return ++count;
else
{
count++;
if((n%2)!=0)
return cycle((3*n)+1);
else ...

Go to advanced search