#include <stdio.h>
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>100)
{
if(year>=2)
{
printf("%s\n","恭喜获得优秀员工奖,");
}
printf("%s\n","很遗憾,期望你再接再厉,");
}
else
{
printf("%s\n","很遗憾,期望你再接再厉,");
}
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>100)
{
if(year>=2)
{
printf("%s\n","恭喜获得优秀员工奖,");
}
printf("%s\n","很遗憾,期望你再接再厉,");
}
else
{
printf("%s\n","很遗憾,期望你再接再厉,");
}
2024-04-01
#include <stdio.h>
int main()
{
int year = 2014;
if(year%4!=0)
{
printf("%s\n","今年是平年");
}
else
{
printf("%s\n","今年是闰年");
}
return 0;
}
int main()
{
int year = 2014;
if(year%4!=0)
{
printf("%s\n","今年是平年");
}
else
{
printf("%s\n","今年是闰年");
}
return 0;
}
2024-04-01
标准答案是不是比较单一,我在if条件内直接用了pow()函数进行立方计算,虽然输出的结果一样,还是报错,提示代码里必须包含a*a*a的格式
2024-03-10
#include <stdio.h>
#define POCKETMONE 10
int main()
{
int POCKETMONE;
POCKETMONE=0;
printf("小明今天又得到%d元零花钱\n",POCKETMONE);
return 0;
}
#define POCKETMONE 10
int main()
{
int POCKETMONE;
POCKETMONE=0;
printf("小明今天又得到%d元零花钱\n",POCKETMONE);
return 0;
}
2024-03-07
#include <stdio.h>
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int nnm = (int)num;
printf("%f\n",num);
printf("num的整数部分是%d\n", nnm);
return 0;
}
个人见解(:
int main()
{
double num = 2.5; //定义浮点型变量num并赋值为2.5
int nnm = (int)num;
printf("%f\n",num);
printf("num的整数部分是%d\n", nnm);
return 0;
}
个人见解(:
2024-03-04
#include <stdio.h>
int main()
{
int sale=120;
int year=1;
if(sale>=100)
{
if(year>=2)
{
printf("%s","Y");
}
else
{
printf("%s\n","N");
}
}
else
{
printf("%s\n","没有");
}
return 0;
}
int main()
{
int sale=120;
int year=1;
if(sale>=100)
{
if(year>=2)
{
printf("%s","Y");
}
else
{
printf("%s\n","N");
}
}
else
{
printf("%s\n","没有");
}
return 0;
}
2024-01-25