2631 求两数平均值
Time Limit : 2000/1000 MS(Java/Others) | Memory Limit : 65536/32768 KB(Java/Others)
Submits : 11538 | Solved : 7997
Description
编写函数,对于给定的任意两个浮点数,计算并返回平均值。
Input
主函数中给定任意两个浮点数。
Output
计算并返回平均值。
Sample Input
4 5
Sample Output
4.50
Template
#include<stdio.h> @-@ int main() { double x,y; double ave; scanf("%lf%lf",&x,&y); ave=average(x,y); printf("%.2f\n",ave); return 0; }
HINT
程序填空题,模板中@-@的位置是需要填空的部分。
Source
NBU OJ