package com.ntt.cn.demo;
public class PrintNumber {
public static void main(String[] args) {
int x = 10;
int i=0;
if (x < 1 || x > 100) {
System.out.println("error");
}
for (; x != 1;i++) {
if (x % 2 == 0) {
x = x / 2;
} else {
x = x * 3 + 1;
}
System.out.println(x);
}
i=i+1;
System.out.println("count:"+i);
}
}