================================================== #include using namespace std; int main( int argc, const char* argv[] ) { int thenum = (int)argv[1]; cout << "Number is: " << thenum << endl; while(thenum != 1) { if((thenum%2)==1) { thenum=(thenum*3)+1; } else { thenum=thenum/2; } cout << thenum << endl; } }