POJ 1004 Financial Management
来源:互联网 发布:linux vi修改文件 编辑:程序博客网 时间:2024/06/13 12:44
Financial Management
Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 131504 Accepted: 56936
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.00489.1212454.121234.10823.05109.205.271542.25839.1883.991295.011.75
Sample Output
$1581.42
Source
Mid-Atlantic 2001
题目大意:
给出十二月份的余额,求每个月的平均余额。
又是水题= =
#include <iostream>using namespace std;int main(){ double a[15]; double sum=0; int i; for(i=1;i<=12;i++) { cin>>a[i]; sum+=a[i]; } cout<<"$"<<sum/12.0<<endl;}
0 0
- 【POJ】1004 Financial Management
- POJ-1004:Financial Management
- POJ 1004 Financial Management
- POJ 1004 Financial Management
- [POJ]1004 Financial Management
- POJ 1004 Financial Management
- poj 1004 Financial Management
- poj 1004 Financial Management
- POJ-1004-Financial Management
- poj 1004 Financial Management
- POJ 1004 Financial Management
- [POJ][1004]Financial Management
- POJ 1004 Financial Management
- POJ 1004 Financial Management
- poj 1004 Financial Management
- poj 1004 Financial Management
- POJ 1004 - Financial Management
- POJ-1004 Financial Management
- C指针
- fedora16设置
- 创建第一个Ubuntu for phone应用
- cocos2dx 的内存管理
- Catalan数
- POJ 1004 Financial Management
- 利用栈判断输入的表达式中的括号是否匹配(假设只含有左、右括号)
- Linux下Rsync+Inotify-tools实现数据实时同步
- Jetty开发指导:WebSocket介绍
- QString和QDateTime之间的相互转换
- 6147问题
- HDFS小文件问题及解决方案
- oracle--PL/SQL基础 Procedure Language & Structured Query Language
- linux--rm(移除档案或目录)