分支/选择语句:
if语句:
#include<stdio.h>
int main()
{
int age = 10;
if(age>10)
printf("hello,world\n");
else if(age>=10 && age<30)//10<=age<30是错误的,会运行<=10
printf("how are you?\n");
else
printf("Good");
return 0;
}
Knowledge:
1:语句:是由分号隔开的的
ING
标签:语句,10,Knowledge,age,C语言,初识,printf,else From: https://blog.51cto.com/u_15981668/6106471