>>260
#include <iostream>
main()
{
int step;
for(step = 0 ;n > 1;step++)
{
 n = n % 2 ? n/2 : 3*n+1;
 cout << n << endl;
}
cout << "ステップ数:" << step << endl;

}