作业帮 > 综合 > 作业

程序很简单,对10个数求平均数.

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/24 07:19:43
程序很简单,对10个数求平均数.
#include"stdio.h"
void main()
{

int i,n;
float a[10],c;
float aver(float a[],int n);
printf("please input 10 students' score:");
for(i=0;i
c是实型,你得用printf("%f",c);才能输出c
再问: 还是一样的,没有结果。
再答: 给你改了下,现在能运行出结果了 #include"stdio.h" #include"conio.h" void main() { int i,n; float a[10],c; float aver(float a[],int n); printf("please input 10 students' score:"); for(i=0;i