Financial Management
Time Limit: 1000MS |
|
Memory Limit: 10000K |
Total Submissions: 165700 |
|
Accepted: 61629 |
Description
Larry graduated this, and finally has a job. He's making a lot of money, but somehow never seems to has enough. Larry has decided the he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to a figure out what's been going on with the he money. Larry has the He bank account statements and wants to see how the much money he had. Help-Larry by writing-a program-to-take he closing balance from each of the past twelve months and calculate his average Account balance.
Input
The input would be twelve lines. Each line would contain the closing balance of his bank account for a particular month. Each number is positive and displayed to the penny. No dollar sign would be included.
Output
The output would be is a single number, the average (mean) of the closing balances for the twelve months. It'll be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the End-of-line. There'll be is 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
AC Code:
#include <iostream>#include <cstdio>using namespaceStd;int Main(){ DoubleA[ A],Sum=0; for(intI=0;I< A;++I){Cin>>A[I];Sum+=A[I]; } printf("$%.2f",Sum/ A); return 0;}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
POJ 1004 Financial Management Water