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. HDU 2553 N皇后问题(dfs)

    N皇后问题 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description 在 ...

  2. python连接redis文档001

    Installation redis-py requires a running Redis server. See Redis’s quickstart for installation instr ...

  3. SQL Server 对表的 12 种一般性操作

    01. 创建 create table Strings(ID int);    go 02. 为表添加列 alter table Strings    add String nvarchar(32); ...

  4. js 异步流程控制之 avQ(avril.queue)

    废话前言 写了多年的js,遇到过最蛋疼的事情莫过于callback hell, 相信大家也感同身受. 业界许多大大也为此提出了很多不错的解决方案,我所了解的主要有: 朴灵 event proxy, 简 ...

  5. 复习完毕STM32开发板

        经过半个晚上的折腾,终于复习了STM32开发板,并使用ST官方库调试完毕一个printf重定向到串口的程序,3.5的库同以前的库不大一样,不过最终搞好了可以睡觉了,还可以睡7个小时.     ...

  6. BCB的博客,以及例子(好多传输文件的例子)

    http://blog.csdn.net/keyu1711/ http://download.csdn.net/user/keyu1711 http://download.csdn.net/user/ ...

  7. Linux常用C函数---字符串转换篇

    函数讲解部分参考http://net.pku.edu.cn/~yhf/linux_c/ atof(将字符串转换成浮点型数) 相关函数 atoi,atol,strtod,strtol,strtoul 表 ...

  8. eclipse sysout快捷输入启用

    Window-Preference-java-editor-content assist-advanced 一定要勾选Template Propasals. 关于Template Propasals: ...

  9. java logger级别

    typedef enum android_LogPriority { ANDROID_LOG_UNKNOWN = 0, ANDROID_LOG_DEFAULT,    /* only for SetM ...

  10. JavaScript 【跨浏览器XPath,做个兼容】

    IE的Xpath 获取单一节点 var xmlDom = getXMLDOM(xmlStr);//调用之前写好的方法获得XMLDOM对象 // var node = xmlDom.selectSing ...