目录
一、BC72 平均身高
二、BC18 计算带余除法编辑
三、BC83 被5整除问题编辑
四、BC84计算y的值
五、BC41 你是天才吗?
六、BC31 发布信息
七、BC17 计算表达式的值
八、BC6 小飞机
**太简单的题就没有文字叙述了~
一、BC72 平均身高

#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
double arr[5] = { 0 };//创建数组
int num = 0;
num = sizeof(arr) //sizeof(arr[0]);//计算arr数组里有多少个元素
int i = 0;
double sum = 0;//创建sum,统计元素和
for (i = 0; i<5; i++)
{
scanf("%lf", &arr[i]);//循环输入5次值,放入arr数组
sum = sum + arr[i];//每输入一次,计算sum的和
}
printf("%.2lf", sum / num);//保留小数点后两位,输出平均值
return 0;
}
二、BC18 计算带余除法
int main()
{
int a = 0;
int b = 0;
scanf("%d %d", &a, &b);
printf("%d %d", a / b, a%b);
return 0;
}
三、BC83 被5整除问题
int main()
{
int M = 0;
scanf("%d", &M);
if (M % 5) //M % 5得到非0的数,执行if语句,说明有余数
{
printf("NO");//不能被五整除
}
else //否则为0
{
printf("YES");//能被五整除
}
return 0;
}
四、BC84计算y的值

#include <stdio.h>
int main()
{
int x = 0;
int y = 0;
scanf("%d", &x);
if (x<0)
{
y = 1;
}
else if (x == 0)
{
y = 0;
}
else
{
y = -1;
}
printf("%d\n", y);
return 0;
}
五、BC41 你是天才吗?

#include <stdio.h>
int main()
{
int x=0;
scanf("%d",&x);
if(x>=140)
{
printf("Genius\n");
}
return 0;
}
六、BC31 发布信息

#include <stdio.h>
int main()
{
printf("I lost my cellphone!\n");
return 0;
}
七、BC17 计算表达式的值

#include <stdio.h>
int main()
{
int a = 40;
int c = 212;
printf("%d\n",(-8+22)*a-10+c/2);
return 0;
}
八、BC6 小飞机

#include <stdio.h>
int main()
{
printf(" ** \n");
printf(" ** \n");
printf("************\n");
printf("************\n");
printf(" * * \n");
printf(" * * \n");
return 0;
}
![[附源码]Python计算机毕业设计Django人体健康管理app](https://img-blog.csdnimg.cn/99ea3b328f864d849484f3d519bc5fb7.png)



![[附源码]Python计算机毕业设计SSM教务一点通管理系统(程序+LW)](https://img-blog.csdnimg.cn/9a5af17b6ab8492abcb3372e2a2982b0.png)


![[论文阅读] 颜色迁移-颜色空间的选择](https://img-blog.csdnimg.cn/d28fb44ddb18472bbf6d44d321d3e11f.png)

![[附源码]计算机毕业设计校园服装租赁系统Springboot程序](https://img-blog.csdnimg.cn/762bc70d56a54bb4b914379d57a8bcc6.png)


![[附源码]计算机毕业设计校园便携系统Springboot程序](https://img-blog.csdnimg.cn/b15cc6bc878543f19c38bf3e26552d53.png)





