1.链接地址:

http://poj.org/problem?id=1004

http://bailian.openjudge.cn/practice/1004

2.题目:

总时间限制:
1000ms
内存限制:
65536kB
描述
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.
输入
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.
输出
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.
样例输入
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
样例输出
$1581.42
来源
Mid-Atlantic 2001

3.思路:

4.代码:

 #include "stdio.h"
//#include "stdlib.h"
int main()
{
int i=;
float tmp=,sum=;
for(i=;i<;i++)
{
scanf("%f",&tmp);
sum+=tmp;
}
printf("$%.2f",sum/);
//system("pause");
return ;
}

OpenJudge/Poj 1004 Financial Management的更多相关文章

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

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

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

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

  3. poj 1004 Financial Management

    求平均数,记得之前在杭电oj上做过一个求平均数的题目,结果因为题目是英文的,我就懵逼了 #include <stdio.h> int main() { ; double num; int ...

  4. [POJ 1004] Financial Management C++解题

    参考:https://www.cnblogs.com/BTMaster/p/3525008.html #include <iostream> #include <cstdio> ...

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

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

  6. Financial Management POJ - 1004

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

  7. POJ 1004:Financial Management

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

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

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

  9. [POJ] Financial Management

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

随机推荐

  1. SpringMVC学习 DispatcherServlet (转载)

    3.1.DispatcherServlet作用 DispatcherServlet是前端控制器设计模式的实现,提供spring Web MVC的集中访问点,而且负责职责的分派,而且与Spring Io ...

  2. DRM加密技术是怎么一回事

    有时我们在播放从网上下载的影视文件时会要求输入用户许可证,否则就不能正常播放,听说是用了一种DRM技术,请简单介绍一下. 答:通常这是利用了多媒体DRM加密技术保护版权(DRM是数字权限管理技术的缩写 ...

  3. Redis实战之征服 Redis + Jedis + Spring (二)

    不得不说,用哈希操作来存对象,有点自讨苦吃! 不过,既然吃了苦,也做个记录,也许以后API升级后,能好用些呢?! 或许,是我的理解不对,没有真正的理解哈希表. 相关链接: Redis实战 Redis实 ...

  4. C#-窗体之间传递参数

    主窗体: ].Value.ToString(); AddRoomTypeFrm AddRoomTypeFrm = new AddRoomTypeFrm(getroomtypeid); AddRoomT ...

  5. Swipe2.1更新——移动Web内容滑块

    Swipe JS 是一个轻量级(3.7 kb) mobile slider,支持 1:1 触摸移动(基于精确的触摸位置的内容滑动). 但是我使用一段时间后发现两个bug,所以在官方2.0(官网http ...

  6. Java连接redis的使用演示样例

    Java连接redis的使用演示样例 Redis是开源的key-value存储工具,redis通经常使用来存储结构化的数据,由于redis的key能够包括String.hash.listset和sor ...

  7. mysql服务器辅助选项

    查看控制台命令行前缀 : echo $PS1 ,例如输出 '[\u@\h \w]#     其中,\u是用户名,\h是主机名称: hostname -s 可以查看当前主机名,  hostname 'z ...

  8. uva - 133 The Dole Queue(成环状态下的循环走步方法)

    类型:循环走步 #include <iostream> #include <sstream> #include <cstdio> #include <cstr ...

  9. Ubuntu 安装php_intl 扩展

    PHP Intl 类在I18n的网站中真的很方便,允许你依赖在终端用户区域,很容易的输出正确的日期格式. 在使用 yii2-app-ecom , 初始化之后,访问首页出现了: The default ...

  10. MYSQL交换两列数据实例

    UPDATE cf_2015_company a, cf_2015_company bSET a.cname = b.linkman, a.linkman = b.cnameWHERE a.id = ...