Problem 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 <bits/stdc++.h>

using namespace std;

int main()
{
double x, sum = 0;
int n = 12;
while(n --)
{
cin >> x;
sum += x;
}
cout << '$' << sum / 12.0 << endl;
return 0;
}

Financial Management(SDUT 1007)的更多相关文章

  1. Java Business Process Management(业务流程管理) 初识环境搭建

    一.简介 (一)什么是jbpm JBPM,全称是Java Business Process Management(业务流程管理),它是覆盖了业务流程管理.工作流.服务协作等领域的一个开源的.灵活的.易 ...

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

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

  3. 数据结构实验之排序五:归并求逆序数(SDUT 3402)

    归并排序详解(戳我). 以下是搬了别人的. #include<stdio.h> #include<stdlib.h> long long sum = 0; int a[1000 ...

  4. 数据结构实验之二叉树六:哈夫曼编码(SDUT 3345)

    题解:离散中的"最小生成树(最优树)". #include <bits/stdc++.h> using namespace std; void qusort(int l ...

  5. 学密码学一定得学程序(SDUT 2463)

    Problem Description 曾经,ZYJ同学非常喜欢密码学.有一天,他发现了一个很长很长的字符串S1.他很好奇那代表着什么,于是神奇的WL给了他另一个字符串S2.但是很不幸的是,WL忘记跟 ...

  6. 顺序表应用8:最大子段和之动态规划法(SDUT 3665)

    Problem Description 给定n(1<=n<=100000)个整数(可能为负数)组成的序列a[1],a[2],a[3],-,a[n],求该序列如a[i]+a[i+1]+-+a ...

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

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

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

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

  9. State management(状态管理)

    State management https://en.wikipedia.org/wiki/State_management UI控件的状态管理, 例如按钮的灰化.只读.显示隐藏等. 特殊地一个控件 ...

随机推荐

  1. Python基础 第四章 字典(2)字典方法&章小结

    1. clear 方法clear删除所有的字典项,就地执行,什么都不返回(或者说返回None) d = {} d['name'] = 'Gumby' d['age'] = 42 print(d) re ...

  2. LocalDate与Date转化

    // 01. java.util.Date --> java.time.LocalDateTimepublic void UDateToLocalDateTime() { java.util.D ...

  3. sqlce基本语法

    整理和总结一下SQLCE的用法引用  System.Data.SqlServerCe(1)数据库文件的创建     SqlCeEngine eng = new SqlCeEngine("Da ...

  4. 设计模式风格<二>;消息总线

    以前开发的动车模拟驾驶系统,有好几个软件(不在一台机器上),他们互相之间通信,因此每个软件要配置每个模块的IP和端口,就是每个模块都要知道别的模块的端口和IP. 这样有个重复的地方,B模块和C模块都要 ...

  5. 微信小程序的wxs语法与vue计算属性

    微信小程序的wxs语法 可以当做vue的计算属性和vue filter 使用.因为wxs中的函数可以写在{{   }}中 . 例如: 可用在 <view>{{ foo() }}</v ...

  6. 小程序e.currentTarget与e.target 两个属性的区别

    注册事件是获取小程序组件上面的自定义属性值 e.target是获取当前点击的标签上面的自定义属性 e.currentTarget是获取注册点击事件标签内的自定义属性

  7. ES6的拓展

    1.String的拓展 ① str.includes("abc"); ② str.startWith("abc"); ③ str.endWith("a ...

  8. 【jekins】jenkins构建触发

    一.定时构建的语法 * * * * *(五颗星,中间用空格隔开)第一颗*表示分钟,取值0~59第二颗*表示小时,取值0~23第三颗*表示一个月的第几天,取值1~31第四颗*表示第几月,取值1~12第五 ...

  9. tempfile:临时文件系统对象

    介绍 想要安全的创建名字唯一的临时文件,以防止被试图破坏应用或窃取数据的人猜出,这很有难度.tempfile模块提供了多个函数来安全创建临时文件系统资源.TemporaryFile函数打开并返回一个未 ...

  10. cas多方式登录相关知识点的总结

    知识点: cas多表单登录(在用户名,密码的基础上,增加短信验证码登录) 自定义认证策略 自定义字段添加为空校验的错误信息 Controller层接口的调用 一:场景 项目涉及到的业务是,在原cas用 ...