int n = 6; while (n != 4) { if (n % 2 != 0) //为奇数 { n = n * 3 + 1; } else { //为偶数 n = n / 2; } printf("%d ", n); }
C语言是C#?