【1004】Financial Management (POJ)(水题——求平均值)
来源:互联网 发布:2016年的网络流行语 编辑:程序博客网 时间:2024/06/06 03:04
Home Page
F.A.Qs
Statistical ChartsCurrent Contest
Past Contests
Scheduled Contests
Award Contest
Language:
Financial Management
Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 134719Accepted: 57403
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 <stdio.h>#include <string.h>#include <stdlib.h>#include <iostream>using namespace std;int main(){ double a[12]; int i; double ave=0; for(i=0; i<12; i++) { cin>>a[i]; ave+=a[i]; } ave/=12; cout<<"$"<<ave<<endl; return 0;}
×
0 0
- 【1004】Financial Management (POJ)(水题——求平均值)
- POJ 1004 Financial Management 水题 求平均数
- POJ 1004 Financial Management(水题)
- (POJ 1004)Financial Management
- Financial Management - POJ 1004 水题
- 【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
- 2013~2014年终总结
- python中各种基础类型的转换,二进制,八进制,十进制,十六进制
- LeetCode OJ - Symmetric Tree
- java string类 基本操作
- CoAP学习笔记——nodeJS node-coap返回JSON数据包
- 【1004】Financial Management (POJ)(水题——求平均值)
- mac命令大全
- C++ 封装只能防止无意识的越权访问
- Elevator
- MyEclipse 8.5整合Git,并在csdn Git上发布项目
- C语言关键字
- 设置navigationBar和tabbar边框隐藏
- android Setting
- 什么是线程?它与进程有什么区别?为什么要使用多线程?