#include <stdio.h>
#define TRUE 1
#define FALSE 0
int main(void) {
int again = TRUE, input;
puts("輸入小於 50 的數字即結束迴圈。");
while (again) {
printf("請輸入整數:");
scanf("%d", &input);
again = (input < 50) ? FALSE : TRUE;
}
return 0;
}
_Bool/stdbool.h)。again,非零即真。#include <stdbool.h> 並使用 true/false/bool。