int main() { int n = 25; while (n > 1) switch (n % 2) { case 0: n /= 2; break; default: printf("%d\n",n); n *= 3; n += 1; } return 0; }