Financial Management
Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 165062   Accepted: 61316

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

水题,求十二个数的平均值。

代码:

#include <iostream>
using namespace std;
int main()
{
float sum=0.0,a;int i;
for(i=1;i<=12;i++)
{
cin>>a;
sum+=a;
}
printf("$");
printf("%.2lf\n",sum/12);
return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

POJ 1004:Financial Management的更多相关文章

  1. 九度OJ 1148:Financial Management(财务管理) (平均数)

    与1141题相同. 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:843 解决:502 题目描述: Larry graduated this year and finally has a ...

  2. 九度OJ 1141:Financial Management (财务管理) (平均数)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:939 解决:489 题目描述: Larry graduated this year and finally has a job. He's ...

  3. Financial Management POJ - 1004

    Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...

  4. POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!

    水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊. ---------------------------分割线"水过....."--------------------------- ...

  5. poj 1004:Financial Management(水题,求平均数)

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

  6. Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏

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

  7. [POJ] #1004# Financial Management : 浮点数运算

    一. 题目 Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 173910   Acc ...

  8. [POJ] Financial Management

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

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

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

随机推荐

  1. [排错] VO对象和POJO对象的关系

    这或许是一个很蠢的笔记吧...... 这次项目中, 作为一个新人, 没少被这两个概念虐得死去活来的, 现在特别做一次记录, 关于它们二者之间在项目中的应用. 在这里呢, 就不再赘述 VO(view o ...

  2. Day3-O-Median POJ3579

    Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - X ...

  3. SciPy fftpack(傅里叶变换)

    章节 SciPy 介绍 SciPy 安装 SciPy 基础功能 SciPy 特殊函数 SciPy k均值聚类 SciPy 常量 SciPy fftpack(傅里叶变换) SciPy 积分 SciPy ...

  4. JuJu团队12月28号工作汇报

    JuJu团队12月28号工作汇报 JuJu   Scrum 团队成员 今日工作 剩余任务 困难 飞飞 完成GUI 待安排 无 婷婷 调试代码 提升acc 无 恩升 修正evaluate 修正evalu ...

  5. WireShark 之抓包QQ协议

  6. java#java.util.Date与java.time.LocalDateTime的转换

    转换主要通过Instant来进行的. Date date = new Date(); LocalDateTime localDateTime = LocalDateTime.ofInstant(dat ...

  7. Pdo 绑定参数方法 通用更新语句

    public  static  function upShelf($table,$arr,$where)    { //将传入的数组进行key vlaue 分离 并将key值以问号方式绑定参数     ...

  8. 《Interest Rate Risk Modeling》阅读笔记——第十章 主成分模型与 VaR 分析

    目录 第十章:主成分模型与 VaR 分析 思维导图 一些想法 推导 PCD.PCC 和 KRD.KRC 的关系 PCD 和 KRD PCC 和 KRC 第十章:主成分模型与 VaR 分析 思维导图 一 ...

  9. 038、Java中逻辑运算之非运算“!”

    01.代码如下: package TIANPAN; /** * 此处为文档注释 * * @author 田攀 微信382477247 */ public class TestDemo { public ...

  10. Netty 模型

    Demo代码 使用Maven的话请在pom.xml中注入netty依赖 <!-- https://mvnrepository.com/artifact/io.netty/netty-all -- ...