#include <stdio.h>
int main()
{
int score = 7200
if(score>=10000)
{printf("%s\n","钻石玩家");
}
else if (score>=5000) {
printf("%s\n","白金玩家");
}
else if (score>=1000) {
printf("%s\n","青铜玩家");
}
else
{
printf("%s\n","普通玩家");
}
return 0;
}
int main()
{
int score = 7200
if(score>=10000)
{printf("%s\n","钻石玩家");
}
else if (score>=5000) {
printf("%s\n","白金玩家");
}
else if (score>=1000) {
printf("%s\n","青铜玩家");
}
else
{
printf("%s\n","普通玩家");
}
return 0;
}
2021-08-14
int age = 15;
int height = 162;
float weight = 82.5;
char isfat = 'y';
printf("年龄:%d 岁\n", age);
printf("身高:%d CM\n", height);
printf("体重:%f KG\n", weight);
printf("是否属于肥胖儿童:%c\n", isfat);
int height = 162;
float weight = 82.5;
char isfat = 'y';
printf("年龄:%d 岁\n", age);
printf("身高:%d CM\n", height);
printf("体重:%f KG\n", weight);
printf("是否属于肥胖儿童:%c\n", isfat);
2021-08-14
最新回答 / 慕神5269880
https://www.qidian.com/soushu/%E ... 5%32%2E%38%62%63%6Ahttps://www.qidian.com/soushu/%E ... 6%AD%A5%32%2E%38%62https://www.oschina.net/search?i ... 5%32%2E%38%77%65%7Ahttps://www.qidian.com/soushu/%E ... 6%AD%A5%32%2E%38%62https://www.oschina.net/search?...
2021-08-14
最赞回答 / zb2014014146
这是属于前面自增自减的问题,num++是先取值,再运算。++num是先运算,再取值。所以前者最后是取到9再加1等于10循环结束,前者是先9加1等于10后再取值而10<=10还有一次循环先加到11再取值,最后不符合题目要求。所以一般这种问题都是++写在前面。
2021-08-13
#include <stdio.h>
int main()
{
int x = 0;
printf("x=%d\n",x++);
printf("x=%d\n",++x);
return 0;
}
int main()
{
int x = 0;
printf("x=%d\n",x++);
printf("x=%d\n",++x);
return 0;
}
2021-08-12
#include <stdio.h>
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n", x+y );
printf("x-y=%d\n", x-y );
printf("x*y=%d\n", x*y );
printf("x/y=%d\n", x/y );
printf("x%%y=%d\n",x%y );
return 0;
}
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n", x+y );
printf("x-y=%d\n", x-y );
printf("x*y=%d\n", x*y );
printf("x/y=%d\n", x/y );
printf("x%%y=%d\n",x%y );
return 0;
}
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int nus=(int)(num);
printf("num的整数部分是%d\n", nus);
return 0;
}
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int nus=(int)(num);
printf("num的整数部分是%d\n", nus);
return 0;
}
2021-08-12
最新回答 / 慕哥1405949
#include <stdio.h>int main() { int year = 2014; //今年是2014年 //补全一下代码 if(year%4 == 0) { printf("今年是闰年"); } else { printf("今年是平年"); } return 0;}
2021-08-11