本文主要是介绍九度OJ 题目1141:Financial Management,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
/********************************* * 日期:2013-2-7* 作者:SJF0115 * 题号: 九度OJ 题目1141:Financial Management* 来源:http://ac.jobdu.com/problem.php?pid=1141* 结果:AC * 来源:2009年北京大学计算机研究生机试真题* 总结:
**********************************/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>int main()
{double money[12];double average, sum;int i;while(scanf("%lf",&money[0]) != EOF){sum = money[0];for(i = 1; i <12; i++){scanf("%lf",&money[i]);sum += money[i];}average = sum / 12.0;printf("$%.2lf\n",average);}return 0;
}
这篇关于九度OJ 题目1141:Financial Management的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!