游客 Signup | Login
中文 | En

2452 - 求整数平均数II

从键盘读入5个整数,求这5个数的平均数,结果保留2位小数。
行末输出一个换行符。

Input

输入为一行,该行有5个整数,数与数之间由一个空格隔开。

Output

输出这5个数的平均数,结果保留2位小数。行末输出一个换行符。

Examples

Input

1 2 3 4 5

Output

3.00

Solution C

#include<stdio.h>

int main()
{
	int a,b,c,d,e;
	float f;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	f=(a+b+c+d+e)/5;	
	printf("%.2f\n",f);	 
    return 0;	
}

Solution C++

#include<stdio.h>

int main()
{
	int a,b,c,d,e;
	float f;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	f=(a+b+c+d+e)/5;
	printf("%.2f\n",f);
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题