HD1064Financial Management
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 题目到是长的很,实际上却是一道求平均数的水题,不过在void main 和int main这里纠结了挺久,因为在OJ上过不鸟,vc和dev都过了,==。#include<stdio.h>
void main()
{
double s=0,m;int i;
for(i=1;i<=12;i++)
{
scanf("%lf",&m);
s+=m;
}
printf("$%.2f\n",s/12);
}
HD1064Financial Management的更多相关文章
- SQL Server Management Studio 无法修改表,超时时间已到 在操作完成之前超时时
在修改表时,保存的时候显示:无法修改表,超时时间已到 在操作完成之前超时时间已过或服务器未响应 这是执行时间设置过短的原因,可以修改一下设置便能把执行时间加长,以便有足够的时间执行完修改动作. 在 S ...
- Java Business Process Management(业务流程管理) 初识环境搭建
一.简介 (一)什么是jbpm JBPM,全称是Java Business Process Management(业务流程管理),它是覆盖了业务流程管理.工作流.服务协作等领域的一个开源的.灵活的.易 ...
- Power Management开发的一般流程
本文作为一个提纲挈领的介绍性文档,后面会以此展开,逐渐丰富. 开发流程 针对一个PM feature进行开发,设计模型是第一步.模型设计好之后,还要保留参数接口,可以基于这些参数针对特殊个体进行优化. ...
- sqlserver2008附加数据库时提示“无法为该请求检索数据。 (Microsoft.SqlServer.Management.Sdk.Sfc)”
解决方案: 右击SQL Server Management Studio以管理员身份运行,选择与脱机数据库时相同的登陆方式(win还是sa),进入后再附加就是ok了.
- Information Management Policy(信息管理策略)的使用范例
基础知识 很多人都会定期收拾自己的书架或者抽屉,把里面过旧的资料拿走,为新的资料腾出空间来,这样既可以节省空间,而且当冗余资料过多的时候也会降低你查找的速度和效率.那么,在企业的SharePoint中 ...
- 禁用SQL Server Management Studio的IntelliSense
禁用SQL Server Management Studio的IntelliSense 本文版权归作者所有,未经作者同意不得转载.
- Policy Management
策略管理用于管理数据库实例.数据库以及数据库对象的各种属性,Policy Management 位于Management Catalog下, 一,Basic concepts 引用园子里深蓝的博客&l ...
- 开源WinForms界面开发框架Management Studio 选项卡文档 插件 Office 2007蓝色风格 后台线程
Management Studio是我在WinForms小项目开发过程中搭建起来的一个插件式结构的应用程序框架,因为简单灵活又容易扩展,现在将它开源供读者参考. 跑起来的效果图如下所示,具备选项卡式多 ...
- Sql Server系列:Microsoft SQL Server Management Studio模板资源管理器
模板资源管理器是Microsoft SQL Server Management Studio的一个组件,可以用来SQL代码模板,使用模板提供的代码,省去每次都要输入基本代码的工作. 使用模板资源管理器 ...
随机推荐
- hdu 4405 Aeroplane chess(简单概率dp 求期望)
Aeroplane chess Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- BZOJ 4557 侦查守卫
好迷的树形dp... #include<iostream> #include<cstdio> #include<cstring> #include<algor ...
- Hide/Show running Console
http://stackoverflow.com/questions/3571627/show-hide-the-console-window-of-a-c-sharp-console-applica ...
- Servlet 3.0 之@WebFilter怎么控制多个filter的执行顺序
之前我们控制多个filter的执行顺序是通过web.xml中控制filter的位置来控制的,放在上面的会比放在下面的先执行,如下“用户登录检查过滤器”会比“接口日志过滤器”先执行 <!-- ...
- Sqlserver高级查询
1.查询表结构 --查询表结构(字段名.字段类型.字段长度.能否为空) SELECT syscolumns.name,systypes.name, syscolumns.length ,syscolu ...
- SPY++的使用
百度百科Spy++ 使用的是VS2010.net自带的功能,可以从开始菜单中打开.
- vector & array
private static const NUM_LOOPS:int = 15; public function VectorTest():void { var vector:Vector.<i ...
- LA 3635 Pie 派 NWERC 2006
有 f + 1 个人来分 n 个圆形派,每个人得到的必须是一整块派,而不是几块拼在一起,并且面积要相同.求每个人最多能得到多大面积的派(不必是圆形). 这题很好做,使用二分法就OK. 首先在读取所有派 ...
- 查看Linux下端口占用情况的命令
在使用Linux系统的过程中,有时候会遇到端口被占用而导致服务无法启动的情况.比如HTTP使用80端口,但当启动Apache时,却发现此端口正在使用. 这种情况大多数是由于软件冲突.或者默认端口设置不 ...
- OpenGL ES之GLSurfaceView学习一:介绍
原文地址::http://120.132.134.205/cmdn/supesite/?uid-5358-action-viewspace-itemid-6527 GLSurfaceView是一个视图 ...