博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
POJ1004·Financial Management
阅读量:6616 次
发布时间:2019-06-25

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

hot3.png

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

#include
using namespace std;int main(){ double a[12]; double sum=0; for(int i=0;i<12;i++){ cin>>a[i]; sum+=a[i]; } sum/=12; cout<<"$"<

转载于:https://my.oschina.net/zhangjinhui/blog/60431

你可能感兴趣的文章
批量操作Windows域用户
查看>>
shell脚本 接受用户参数 记录一下
查看>>
健脾祛湿的中成药有哪些?
查看>>
mongodb Index(2)
查看>>
IIS下支持下载.exe文件
查看>>
桌面快捷方式打不开怎么办?用金山网盾可修复
查看>>
CXF WebService Hello World
查看>>
市场调研报告:企业级信息防泄漏大趋势
查看>>
济南企业短信平台的价格如何?
查看>>
requirejs
查看>>
远程控制工具VNC的安装使用
查看>>
安装vmware tools错误解决办法
查看>>
Centos版的安装docker-registry私有仓库
查看>>
redis故障处理 process is already running or crashed
查看>>
find命令详解
查看>>
cxf 学习总结
查看>>
Linux之sysctl.conf与limits.conf优化配置
查看>>
《Android 4游戏高级编程(第2版)》书评
查看>>
min-width与max-width
查看>>
jdbc oracle clob blob long类型数据
查看>>