c语言给定十实数,输出平均值,并统计
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/12 22:01:29
#includevoidmain(){inti,count=0;floata[10],sum=0,aver;printf("pleaseinput10number:\n");for(i=0;i
#include“stdio.h”#defineMAX100voidmain(){intmark[MAX],sum=0,mark=0,j=0,aver=0;printf("请输入学生成绩,输入负数结束
#includeintmain(void){intx[10];intsum=0;inti=0;intavg=0;for(i=0;i
voidmain(){inti=0,sum=0,max,num;floatavg=0.0;for(i=0;imax)max=num;}sum=sum+num;}avg=sum*1.0/20;print
#inlcudevoidmain(){inta[6];inti,j,max=0,sum=0;doubleavg=0.0;printf("请输入六个数:\n");for(i=0;imax)max=a[i
假设是用a数组存放的数据intsum=0,i,num=0,average;for(i=0;i
#includevoidmain()ints,num,i,a;s=0;for(i=1;i
#includevoidmain(){inta,b;doubleave;//必须是浮点型的ave=0.00;a=0;b=0;printf("输入两个整数:');scanf("%d%d",&a,&b);
#include"stdio.h"#include"math.h"void main(){ int i,j=NULL,
#includemain(){inta,b,c;doubleavg=0.0;scanf("%d%d%d",&a,&b,&c);avg=(a+b+c)/3;printf("%.3f",avg);再问:不
你好! 程序改好了,运行的结果 完整的程序,你看看吧,满意请采纳#include<stdio.h>int ma
#include<stdio.h>int main(){ int a[10],i,num=0; float ave
#includevoidmain(){floata[10],sum=0,aver,max,min;//以输入10个数为例inti;for(i=0;i
用%g就OK了:#include <stdio.h>int main(){\x05float x; x = 2.34
void main(){int n1,n2;printf("输入第1个整数:n1\n");scanf("%d",&n1);p
#includeintmain(){inti,j,k,n,m,a[10][2];intaverage_nm,sum=0;printf("Pleaseinputnandm,whenn=0,finishi
#includevoidmain(){inti,b=0;floatp,a[5],sum;for(i=0;i
#include "stdio.h"int main(){ double x,sum=0,ave; int
#includevoidmain(){inta,b,c,d;printf("Pleaseinput3numbers,example,[1,2,3]:\n");scanf("%d,%d,%d",&a,&
10a[0]=1a[1]=7a[2]=4a[3]=0a[4]=9a[5]=4a[6]=8a[7]=8a[8]=2a[9]=4Pressanykeytocontinue#include#include#