if-else语句
#include <stdio.h>
//判断输入值是否大于0
int main()
{
int i;
while (scanf("%d",&i))
{
if (i > 0)//不要在括号后加分号
{
printf("i is bigger than O\n");
}else {
printf("i is not bigger than O\n");
}
}
return O;
}
if(number>500)cost=0.15;
else if(number>300)cost=0.10;
else if(number>100)cost=0.075;
else if(number>50)cost=0.05;
else cost=0;
练习题
1、关系表