Financial Management

时间限制: 1000ms 内存限制: 10000KB

问题描述
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

来源
{Mid-Atlantic 2001}

问题分析:(略)

这个问题和《UVALive2362 POJ1004 HDU1064 ZOJ1048 Financial Management【数学计算】》是同一个问题,代码拿过来用就AC了。

程序说明:参见参考链接。

参考链接:UVALive2362 POJ1004 HDU1064 ZOJ1048 Financial Management【数学计算】

题记:程序做多了,不定哪天遇见似曾相识的。

AC的C++程序如下:

/* UVALive2362 Financial Management */#include <iostream>
#include <cstdio>using namespace std;int main()
{double val, sum;sum = 0;for(int i=1; i<=12; i++) {cin >> val;sum += val;}printf("$%.2f\n", sum / 12);return 0;
}

NUC1011 Financial Management【数学计算+水题】相关推荐

  1. NUC1003 Hangover【数学计算+水题】

    Hangover 时间限制: 1000ms 内存限制: 65536KB 问题描述 How far can you make a stack of cards overhang a table? If ...

  2. HDU3782 xxx定律【数学计算+水题】

    xxx定律 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Subm ...

  3. HDU2551 竹青遍野【数学计算+水题】

    竹青遍野 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  4. HDU2178 猜数字【数学计算+水题】

    猜数字 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submis ...

  5. HDU2156 分数矩阵【数学计算+水题】

    分数矩阵 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  6. HDU2153 仙人球的残影【数学计算+水题】

    仙人球的残影 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Sub ...

  7. HDU2548 两军交锋【数学计算+水题】

    两军交锋 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  8. 数学题库python_GitHub Python项目推荐|一个拍照做题程序|数学计算题识题|opencv...

    GitHub Python项目推荐|一个拍照做题程序输入一张包含数学计算题的图片输出识别出的数学计算式以及计算结果 项目分析 仓库名称:mathAI 标星(star):1469 (网红级项目,高手作品 ...

  9. [蓝桥杯2018初赛]第几天-日期计算(水题)

    闰年(Leap Year)是为了弥补因人为历法规定造成的年度天数与地球实际公转周期的时间差而设立的.补上时间差的年份为闰年.闰年共有366天(1月~12月分别为31天.29天.31天.30天.31天. ...

最新文章

  1. python连通域标记_图像分析:二值图像连通域标记
  2. 3.以太坊之秘钥文件
  3. SQL数据库学习之路(五)
  4. Gentoo 安装日记 13 (配置内核 :可执行文件安格式和网络)
  5. 6套制造业大数据解决方案免费送,内含详细步骤手把手教会你
  6. 计算机vb选择题题题库,2013计算机二级VB真考选择题题库(4
  7. 产品小白的知识点1——用户周期
  8. SQL Server CONVERT() 函数,Date 函数
  9. Web页面获取用户控件页面中服务器控件的值
  10. Nginx开启stub_status模块配置方法_nginx
  11. 【SQL练习题】排序
  12. instsrv.exe srvany.exe 实现不登陆桌面启动
  13. 云服务器应用打不开,云虚拟主机网站打不开等常见错误提示解决方法
  14. C++静态库和动态库的导入导出
  15. 2021消防设施操作员(中级)岗位考试真题安全检查知识部分
  16. Java基础面试题(2022版)
  17. 单引号与双引号的用法
  18. PowerBI-日期和时间函数-EOMONTH
  19. magento 2 Send Tracking Information 发送跟踪信息 无法发送邮件
  20. 跨部门协作及沟通的总结

热门文章

  1. JavaWeb——响应编码与请求编码
  2. 使用jqueryMobile + phoneGap 开发移动端应用
  3. pppoe 服务器 无线,centos搭建pppoe拨号服务器
  4. 【java学习之路】(java SE篇)004.面向对象基础入门part1
  5. Java复习总结(二)Java SE 面试题
  6. Doris之Routine Load
  7. explain如何查看mysql_MySql中如何使用 explain 查询 SQL 的执行计划
  8. unet服务器向客户端发消息,unet
  9. 机器学习——KNN及代码实现
  10. 单例模式及多线程安全(C++版)