OpenJudge/Poj 1004 Financial Management
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的更多相关文章
- poj 1004:Financial Management(水题,求平均数)
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 126087 Accepted: ...
- [POJ] #1004# Financial Management : 浮点数运算
一. 题目 Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 173910 Acc ...
- poj 1004 Financial Management
求平均数,记得之前在杭电oj上做过一个求平均数的题目,结果因为题目是英文的,我就懵逼了 #include <stdio.h> int main() { ; double num; int ...
- [POJ 1004] Financial Management C++解题
参考:https://www.cnblogs.com/BTMaster/p/3525008.html #include <iostream> #include <cstdio> ...
- POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!
水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊. ---------------------------分割线"水过....."--------------------------- ...
- Financial Management POJ - 1004
Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...
- POJ 1004:Financial Management
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 165062 Accepted: ...
- Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 164431 Accepted: ...
- [POJ] Financial Management
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 182193 Accepted: ...
随机推荐
- JNI-数据类型
转载:http://blog.csdn.net/conowen/article/details/7523145 在Java中有两类数据类型:primitive types,如,int, float, ...
- Java算法试题--猜字母/杀人游戏
题目例如以下: 把abcd-s共19个字母组成的序列反复拼接106次,得到长度为2014的串. 接下来删除第1个字母(即开头的字母a).以及第3个,第5个等全部奇数位置的字母. 得到的新串再进行删除奇 ...
- SQLServer2005日志传送常见的几个问题
1.STANDBY 只读方式还原数据库:[备份数据库服务器]将完全备份文件复制到备份数据库服务器上,并以STANDBY的方式进行恢复 . SQL语句: RESTORE DATABASE [CNBlog ...
- android122 zhihuibeijing 新闻中心NewsCenterPager加载网络数据实现
新闻中心NewsCenterPager.java package com.itheima.zhbj52.base.impl; import java.util.ArrayList; import an ...
- 项目源码--Android高质量图片浏览器源码
下载源码 技术要点: 1. 浏览所有格式的图片 2. 图片缓存到数据库 3. Sqlite数据库的高级应用 4. 文件夹缩图显示 5. 多点触控技术 6. 动画技术 7. 支持超高清图片 8. ...
- Apache rewrite 详解
用rewrite可实现的部分:URL根目录搬迁,多目录查找资源,阻止盗连你的图片,拒绝某些主机访问,基于时间重写,据浏览器类型重写,动态镜像远程资源,外部重写程序模板,等等 详见下表: 目标 重写设置 ...
- How to center a div in bootstrap3
There are two approaches to centering a column <div> in Bootstrap 3: Approach 1 (offsets): The ...
- 利用QT开发一个记事本
区别于之前创建爱的各个工程,这次我们在这里选择基类为QMainWindow. 然后默认目录就是 直接到对应文件中进行代码的书写: main.cpp: #include "mainwindow ...
- 会话状态Session解析以及原理分析
我们知道web网站在客户端存储数据有三种形式:1. Cookie 2. hidden(隐藏域) 3.QueryString 其中viewstate什么的都是通过第二种方式隐藏域存储滴. 客户端存储 ...
- 使用SQL循环打印'*'菱形
菱形每一行都是由n个' ' + n 个'**' + 1个'*' 组成的 例如高度为9的菱形(共print 9次),*最多的一次print为第五次第五次就是0个' ' + 4个'**' + 1个'*' ...