我是这样做的
int age = 15;
int height = 162;
float weight = 82.5;
char isfat = 'y';
int age = 15;
int height = 162;
float weight = 82.5;
char isfat = 'y';
2015-05-21
#include <stdio.h>
int main()
{
int a,j=0;
a=1;
while(a<=100)
{
j=j+a;
a++;
printf("100以内的整数之和%d\n",j);
}
return 0;
}
int main()
{
int a,j=0;
a=1;
while(a<=100)
{
j=j+a;
a++;
printf("100以内的整数之和%d\n",j);
}
return 0;
}
2015-05-21
if(sale>100)
{
if(year>=2)
{
printf("%s\n","恭喜你获得优秀员工奖");
}else
{
printf("%s\n","很遗憾,期望你再接再厉");
}
}else
{
printf("%s\n","Sorry,你没资格!!!");
}
{
if(year>=2)
{
printf("%s\n","恭喜你获得优秀员工奖");
}else
{
printf("%s\n","很遗憾,期望你再接再厉");
}
}else
{
printf("%s\n","Sorry,你没资格!!!");
}
2015-05-21
if(score>=10000)
{
printf("钻石玩家");
}
else if(5000<=score&&score<10000)
{
printf("白金玩家");
}
else if(1000<=score&&score<5000)
{
printf("青铜玩家");
}
else
{
printf("普通玩家");
}
{
printf("钻石玩家");
}
else if(5000<=score&&score<10000)
{
printf("白金玩家");
}
else if(1000<=score&&score<5000)
{
printf("青铜玩家");
}
else
{
printf("普通玩家");
}
2015-05-21
#include <stdio.h>
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if(year!=2014)
{
printf("%s\n","今年是闰年");
}else
{
printf("%s\n","今年是平年");
}
return 0;
}
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if(year!=2014)
{
printf("%s\n","今年是闰年");
}else
{
printf("%s\n","今年是平年");
}
return 0;
}
2015-05-21
#include <stdio.h>
int main()
{
int height = 185;
//补全所有代码
if(height>=180)
{
printf("%s\n","恭喜小明可以参加校篮球队");
}
return 0;
}
int main()
{
int height = 185;
//补全所有代码
if(height>=180)
{
printf("%s\n","恭喜小明可以参加校篮球队");
}
return 0;
}
2015-05-21