NYOJ 72 Financial Management

原创 2015年07月07日 19:30:03

Financial Management

时间限制:3000 ms  |  内存限制:65535 KB
难度:1
描述
Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what's been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance.
输入
The input will be twelve lines. Each line will contain the closing balance of his bank account for a particular month. Each number will be positive and displayed to the penny. No dollar sign will be included.
输出
The output will be a single number, the average (mean) of the closing balances for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the end-of-line. There will be no other spaces or characters in the output.
样例输入
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
样例输出
1581.42
啰嗦这么多,只是让求平均数而已。。。
#include
int main(){
	float sum,num;
	for(int i=12;i>0;i--){
		scanf("%f",&num);
		sum+=num;
	}
	printf("%.2f\n",sum/12);
}
版权声明:转载请注明出处

NYOJ_72 Financial Management

输入12个数字求平均
  • think_ycx
  • think_ycx
  • 2015年08月15日 13:36
  • 519

【NYOJ】[72]Financial Management

题目乍看之下 英文的挺麻烦 结果只是让求个平均数……应该是想考察对于浮点数相关的应用吧...
  • u011493189
  • u011493189
  • 2016年01月28日 21:55
  • 113

NYOJ 72 Financial Management

Financial Management 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 Larry graduated this year and ...
  • qq523176585
  • qq523176585
  • 2014年02月11日 11:33
  • 308

nyoj题目72:Financial Management

Financial Management 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 Larry graduated this year and fin...
  • ojhawu
  • ojhawu
  • 2015年01月11日 17:31
  • 225

ACM —— 1004 Financial Management

解题代码: import java.util.Scanner; public class Main { public static void main(String[] args) {...
  • WYYZ5
  • WYYZ5
  • 2015年09月07日 17:29
  • 455

杭电 HDU 1064 Financial Management

Financial Management Time Limit: 400/200 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Othe...
  • lsgqjh
  • lsgqjh
  • 2015年03月23日 20:48
  • 409

题目72 Financial Management

题意就是把12个数加起来求平均数      已AC代码: #include #include using namespace std; int main() { double sum=0...
  • izhouxiaofei
  • izhouxiaofei
  • 2016年07月29日 12:05
  • 74

每天一道算法_5_Financial Management

今天的题目更简单,在考虑是不是应该有挑选性的选题目做。 题目是Financial Management,如下:   Description Larry graduated this year and ...
  • jason0539
  • jason0539
  • 2013年10月07日 07:24
  • 2338

HDU 1064Financial Management(高精度问题)

Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, bu...
  • qq_32866009
  • qq_32866009
  • 2016年04月05日 17:03
  • 251

POJ1004-Financial Management

转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1309072514 额。。还真怀念。。这都遇上了。。2011年5月ACM珠海赛的试机题= =...
  • lyy289065406
  • lyy289065406
  • 2011年07月29日 01:45
  • 5763
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:NYOJ 72 Financial Management
举报原因:
原因补充:

(最多只允许输入30个字)