作业1
来源:互联网 发布:2016家具淘宝数据 编辑:程序博客网 时间:2024/06/12 01:53
必做题1
#include <stdio.h>
int main()
{
int a,b;
printf("请输入两个数;");
scanf("%d %d",&a,&b);
double c=(a+b)/2.0;
printf("%d和%d的平均数=%f\n",a,b,c);
return 0;
}
选做题1
#include <stdio.h>
int main()
{
int a;
int sum=0;
do{
printf("请入一个数;");
scanf("%d",&a);
sum+=a;
}while(a!=0);
double c=sum/3.0;
printf("输入数的总平均数为%f",c);
return 0;
}
阅读全文
0 0
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业(1)
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- 作业1
- Java实现日期加减
- 优秀工程师-UISwitch
- mysql查询当前数据库所有 的表基本信息
- tar中的参数 cvf,xvf,cvzf,zxvf的区别
- Spring Boot系列(一):Spring Boot 入门篇
- 作业1
- Apply for Google FCM ( Firebase Cloud Message ) Project & Configure Android Project
- The project was not built since its build path is incomplete. Cannot find the class file for java.la
- SpringMVC中利用@InitBinder来对表单数据进行解析绑定
- linux下opencv训练xml
- 字符串算法——有重复字符的数组或字符串全排列(Permutations II)
- 第5周项目3 括号的匹配
- CheckBox与文字的间距
- Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/