主页
C 语言
C If ... Else 示例
demo_if_temp
运行 ❯
×
更改方向
保存代码
更改主题
#include
int main() { int temperature = 30; // temperature in Celsius if (temperature < 0) { printf("It's freezing!\n"); } else if (temperature < 20) { printf("It's cool.\n"); } else { printf("It's warm.\n"); } return 0; }
It's warm.