其他分享
首页 > 其他分享> > 习题2-1 求整数均值

习题2-1 求整数均值

作者:互联网

#include<stdio.h>
int main() 
{
	int Sum, a, b, c, d;
	double Average;

	scanf("%d %d %d %d",&a,&b,&c,&d);

	Sum=a+b+c+d;
	Average=(a+b+c+d)/4.0;

	printf("Sum = %d; Average = %.1f", Sum, Average);

	return 0;
}

 

标签:return,int,Average,均值,整数,习题,main,Sum
来源: https://www.cnblogs.com/ytmsnzy/p/16587864.html