南阳oj 题目72 Financial Management

原创 2015年07月10日 12:40:50

Financial Management

时间限制:3000 ms  |  内存限制:65535 KB
难度:1
描述
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.
输入
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. 
输出
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. 
样例输入
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
样例输出
1581.42

注:此题为:南阳oj 题目72 Financial Management

说明:输入12个月的钱数,求平均值

已AC源代码:

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	double m,ave,sum=0;
	int i;
	for(i=0;i<12;++i)
	{
		cin>>m;
		sum+=m;
	}
	ave=sum/12;
	printf("%.2lf\n",ave);
	return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

ACM —— 1004 Financial Management

解题代码: import java.util.Scanner; public class Main { public static void main(String[] args) {...
  • WYYZ5
  • WYYZ5
  • 2015年09月07日 17:29
  • 455

NYOJ_72 Financial Management

输入12个数字求平均
  • think_ycx
  • think_ycx
  • 2015年08月15日 13:36
  • 519

「HD_ACM」Financial Management

Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, ...
  • Simple_Bottle
  • Simple_Bottle
  • 2015年05月04日 18:51
  • 314

题目72 Financial Management

题意就是把12个数加起来求平均数      已AC代码: #include #include using namespace std; int main() { double sum=0...
  • izhouxiaofei
  • izhouxiaofei
  • 2016年07月29日 12:05
  • 74

南阳oj_(72)Financial Management

Financial Management 时间限制:3000 ms  |  内存限制:65535 KB  难度:1 描述 Larry graduated this year ...
  • royal_mjz
  • royal_mjz
  • 2015年10月04日 19:24
  • 232

ACM学习-POJ-1004-Financial Management

菜鸟学习ACM,纪录自己成长过程中的点滴。 学习的路上,与君共勉。 ACM学习-POJ-1003-Financial Management Financial Management ...
  • hitwhylz
  • hitwhylz
  • 2013年09月21日 11:00
  • 2539

nyoj题目72:Financial Management

Financial Management 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 Larry graduated this year and fin...
  • ojhawu
  • ojhawu
  • 2015年01月11日 17:31
  • 225

陆续更新自己在南阳OJ刷题过程,以及蓝桥杯的训练

下个月就要参加蓝桥决赛了,对于一个普通二本院校大三学生来说,这是一个机会,经历过前一段时间的投资失败,现在专心走专业了,慢慢更新,慢慢学习...
  • u012414639
  • u012414639
  • 2016年04月23日 10:54
  • 1427

每天一道算法_5_Financial Management

今天的题目更简单,在考虑是不是应该有挑选性的选题目做。 题目是Financial Management,如下:   Description Larry graduated this year and ...
  • jason0539
  • jason0539
  • 2013年10月07日 07:24
  • 2339

杭电 HDU 1064 Financial Management

Financial Management Time Limit: 400/200 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Othe...
  • lsgqjh
  • lsgqjh
  • 2015年03月23日 20:48
  • 409
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:南阳oj 题目72 Financial Management
举报原因:
原因补充:

(最多只允许输入30个字)