Financial Management
Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 125635   Accepted: 55762

Description

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.

Input

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.

Output

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.

Sample Input

100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75

Sample Output

$1581.42

Source

Mid-Atlantic 2001
 #include<iostream>
using namespace std;
int main()
{
double ave,sum=;
int i=;
for(;i<;i++)
{
cin>>ave;
sum+=ave;
}
printf("$%.2lf\n",sum/);
return ;
}
 

poj1004的更多相关文章

  1. 练习英语ing——[POJ1004]Financial Management

    [POJ1004]Financial Management 试题描述 Larry graduated this year and finally has a job. He's making a lo ...

  2. POJ1004 Financial Management

    题目来源:http://poj.org/problem?id=1004 题目大意: Larry今年毕业并找到了工作.他开始赚很多的钱,然而他似乎总觉得不够.Larry决定好好掌控他的资产,解决他的财务 ...

  3. Financial Management[POJ1004]

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 179458   Accepted: ...

  4. C# ACM poj1004

    水题.. public static void acm1004(float[] a) { ; foreach (var item in a) { sum += item; } Console.Writ ...

  5. ACM训练计划建议(写给本校acmer,欢迎围观和指正)

    ACM训练计划建议 From:freecode#  Date:2015/5/20 前言: 老师要我们整理一份训练计划给下一届的学弟学妹们,整理出来了,费了不少笔墨,就也将它放到博客园上供大家参考. 菜 ...

  6. 【POJ水题完成表】

    题目 完成情况 poj1000:A+B problem 完成 poj1002:电话上按键对应着数字.现在给n个电话,求排序.相同的归一类 完成 poj1003:求最小的n让1+1/2+1/3+...+ ...

  7. 【poj1006】 Biorhythms

    http://poj.org/problem?id=1006 (题目链接) 题意 人自出生起就有体力,情感和智力三个生理周期,分别为23,28和33天.一个周期内有一天为峰值,在这一天,人在对应的方面 ...

  8. poj 算法 分类

    转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:2528   更新时间:2011.09.22  ...

  9. 11月下旬poj其他题

    poj1000,poj1003,poj1004,poj1064,poj1218 水题 poj1012:0<k<14——漂亮的打表 poj1651:与能量项链很像的dp poj1159:回文 ...

随机推荐

  1. Linux上配置Nginx+PHP5(FastCGI)

    原为地址:http://www.laruence.com/2009/07/28/1030.html Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,以事件驱动的方式编写,所以有非常好的性能,同时 ...

  2. SQL 查找某个字段的首字母

    执行以下SQL语句 SELECT ,--或得首字母出现的位置 ),--要替换的字符串 ),''),--替换后的结果 OrderId, * FROM dbo.OrderSync 得到结果如下

  3. 【MYSQL 清空所有的的表中的数据的SQL的生成】

    MYSQL 清空所有的的表中的数据的SQL的生成 select Concat('TRUNCATE TABLE ', TABLE_NAME, ';') from INFORMATION_SCHEMA.T ...

  4. 去掉ExpandableListView的箭头图标

    到ExpandableListView时有个箭头图标系统自带的在你自定义布局也不能去掉只要设置一个属性即可,如下: settingLists.setGroupIndicator(null);  ~~~ ...

  5. TCP的那些事(转载)

    (转载本站文章请注明作者和出处 酷 壳 – CoolShell.cn ,请勿用于任何商业用途) TCP是一个巨复杂的协议,因为他要解决很多问题,而这些问题又带出了很多子问题和阴暗面.所以学习TCP本身 ...

  6. 关键路径(CriticalPath)算法

    #include <stdio.h> #include <stdlib.h> #include <malloc.h> #define MAXVEX 30 //最大顶 ...

  7. Ext 怎么发ajax请求

    Ext3.3完整包 Ext3.3中文文档 数据表的结构是:数据表table  > 记录record > 字段 store的结构是:  Ext.data.Store > Ext.dat ...

  8. ASP.NET获取IP的6种方法 【转】

    ).ToString();//方法四(无视代理)HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR" ...

  9. 移植busybox-1.21.1

    busybox官网:www.busybox.net 1.解压 # tar jxvf busybox-1.21.1.tar.bz2 2.配置 # cd busybox-1.21.1 # make men ...

  10. 十分钟让你明白Objective-C的语法(和Java、C++的对比)

    很多想开发iOS,或者正在开发iOS的程序员以前都做过Java或者C++,当第一次看到Objective-C的代码时都会头 疼,Objective-C的代码在语法上和Java, C++有着很大的区别, ...