C 判断与循环

if、switch、for、while

if / else

if (x > 0) {
} else if (x == 0) {
} else {
}

switch

switch (op) {
    case 1: break;
    default: break;
}

for / while

for (int i = 0; i < n; i++) { }

while (scanf("%d", &n) == 1 && n) { }

break / continue

与 C++ 相同。