# 南阳oj 题目72 Financial Management

## Financial Management

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<iostream>
#include<cstdio>
using namespace std;
int main()
{
double m,ave,sum=0;
int i;
for(i=0;i<12;++i)
{
cin>>m;
sum+=m;
}
ave=sum/12;
printf("%.2lf\n",ave);
return 0;
}

• 本文已收录于以下专栏：

## ACM —— 1004 Financial Management

• WYYZ5
• 2015年09月07日 17:29
• 455

## NYOJ_72 Financial Management

• think_ycx
• 2015年08月15日 13:36
• 519

## 「HD_ACM」Financial Management

Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, ...
• Simple_Bottle
• 2015年05月04日 18:51
• 314

## 题目72 Financial Management

• izhouxiaofei
• 2016年07月29日 12:05
• 74

## 南阳oj_(72)Financial Management

Financial Management 时间限制：3000 ms  |  内存限制：65535 KB  难度：1 描述 Larry graduated this year ...
• royal_mjz
• 2015年10月04日 19:24
• 232

## ACM学习-POJ-1004-Financial Management

• hitwhylz
• 2013年09月21日 11:00
• 2539

## nyoj题目72:Financial Management

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

## 陆续更新自己在南阳OJ刷题过程，以及蓝桥杯的训练

• u012414639
• 2016年04月23日 10:54
• 1427

## 每天一道算法_5_Financial Management

• jason0539
• 2013年10月07日 07:24
• 2339

## 杭电 HDU 1064 Financial Management

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

举报原因： 您举报文章：南阳oj 题目72 Financial Management 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)