Search found 1 match

by enil14someone
Fri Jan 03, 2014 2:32 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318637

3n+ 1 : y u always go WA/RUNTIME!?

yea ive been trying this problem for the tenth time already and its always it wrong answer or runtime. ive check it and it seems fine but still...WA. can anyone tell me whats wrong?

#include <iostream>
using namespace std;

int oddEven(int x)
{
int ctr = 1;

while(x != 1)
{
if(x%2 == 0)
x = x ...

Go to advanced search