博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[POJ] Financial Management
阅读量:6767 次
发布时间:2019-06-26

本文共 1554 字,大约阅读时间需要 5 分钟。

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

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 水炸的题
#include
#include
using namespace std;int main(){ double sum=0; double money; for(int i=0;i<12;i++) { cin>>money; sum+=money; } sum/=12; cout<<"$"<
<
<
<

  

转载于:https://www.cnblogs.com/KennyRom/p/6511597.html

你可能感兴趣的文章
Windows Phone 实用开发技巧(13):自定义Element Binding
查看>>
Puppet filebucket命令参数介绍(九)
查看>>
Hello World
查看>>
Python[8] :paramiko模块多进程批量管理主机
查看>>
时间与文件,信号的操作
查看>>
struts2的核心和工作原理
查看>>
使用StarWind构建Hyper-V Server群集实时迁移
查看>>
MongoDB TTL索引
查看>>
联通电信合体推六模终端 是革了谁的命?
查看>>
就是这么简单(续)!使用 RestAssuredMockMvc 测试 Spring MVC Controllers(转)
查看>>
R12.2 克隆系统结束后 autocfg 报错 rtld: 0712-001 Symbol __pth_init was referenced from module FNDCPUCF...
查看>>
C++ 采集音频流(PCM裸流)实现录音功能
查看>>
结构体中的柔性数组成员(数组长度为0成员)!
查看>>
工欲善其事必先利其器 —— 配置vim
查看>>
Oracle Instant Client(即时客户端) 安装与配置
查看>>
redis 脑裂等极端情况分析
查看>>
windows环境下 生成git公钥和私钥
查看>>
ONVIF测试方法及工具
查看>>
JQuery实战---窗口效果
查看>>
RTP头结构解析
查看>>