题目1141(1148):Financial Management
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:585
解决:331
- 题目描述:
-
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.
- 输入:
-
Each case 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.
- 输出:
-
For each case, 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
- 来源:
- 2010年北京大学计算机研究生机试真题
- 答疑:
- 解题遇到问题?分享解题心得?讨论本题请访问:http://t.jobdu.com/thread-7871-1-1.html
-
#include<stdio.h> int main() {int i;float month[12] ;float sum = 0;while(scanf("%f",&month[0]) != EOF){sum = month[0];for(i = 1; i < 12; i++){scanf("%f",&month[i]);//printf("%.2f\n",month[i]);sum += month[i];}printf("$%.2f\n",sum/12);}return 0; }
scanf输入float时用%f,double时用%lf!
题目1141(1148):Financial Management相关推荐
- 财务管理c语言oj,九度OJ 1141:Financial Management (财务管理) (平均数)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:939 解决:489 题目描述: Larry graduated this year and finally has a job. He's ...
- Introduction to Financial Management
Recently,i am learning some useful things about financial management by reading <Essentials of Co ...
- NUC1011 Financial Management【数学计算+水题】
Financial Management 时间限制: 1000ms 内存限制: 10000KB 问题描述 Larry graduated this year and finally has a job ...
- SAP FICO - Functional Area/ Financial Management Area(FM Area)
Functional Area 是功能范围,是一个对基于活动发生的费用排序的组织单位. 例如:生产,管理,销售,研发等. 功能范围允许建立符合要求的财务报表. 如果该组织遵循销售成本会计,那必须在SA ...
- HFM student Hyperion Financial Management
HFM student Hyperion Financial Management https://docs.oracle.com/cd/E57185_01/index.htm <Oracle ...
- Oracle Hyperion Financial Management工具介绍及脚本使用
oracle HFM工具介绍及脚本使用 一.oracle HFM工具介绍 Oracle Hyperion Financial Management提供了财务整合和报告功能,使您能够快速整合和报告财务结 ...
- 题目1148:Financial Management
/*** 题目描述:Larry graduated this year and finally has a job. He's making a lot of money, but somehow n ...
- ZOJ Problem Set - 1048 Financial Management
我承认这是一道水的不能再水的题,今天一下就做到了,还是无耻的帖上来吧 #include <stdio.h>int main() {double sum=0;for(int i=1;i< ...
- ZOJ 1048|POJ 1004|HDU1064 Financial Management
https://zoj.pintia.cn/problem-sets/91827364500/problems/91827364547 题解: C++版本一 /* *@Author: STZG *@L ...
最新文章
- GDAL2.1.1库在Ubuntu14.04下编译时遇到的问题处理方法
- php发布商品信息逻辑,php – 逻辑思考一个数据库结构:为用户发布的东西添加“标签” – 一个单独的表或……?...
- 了解HTML 元素分类
- DFT实训教程笔记4(bibili版本)- ATPG
- Windows 钩子的使用
- 摄像头自动曝光相关基础知识
- mysql流程控制_Mysql之流程控制结构
- java如何对List集合中的元素进行排序(请收藏)
- 烽火服务器怎么进入bios系统,装机高手告诉你如何进入bios
- 为什么ConcurrentHashMap不允许插入null值?
- vue2.0中watch总结:普通监听和深度监听
- AD-批量启用账户命令 Enable-adaccount
- springboot web项目_SpringBoot 源码解析 (一):SpringBoot核心原理入门
- 网络地址16777343是什么地址?
- 什么是软件质量管理的底层逻辑?
- ffmpeg录制麦克风声音和pc内部声音(如播放歌曲)---混音--修正
- Unity实现鼠标控制摄像机围绕中心点的旋转和缩放
- 《区块链基础知识25讲》-第七讲-双花问题
- 培训html源码,前端培训——html源码笔记
- 多线程 - voliate 关键字
热门文章
- C语言是不是世界上最好的编程语言?真的永远不会过时吗?
- 2020-02-06
- subprocess句柄无效
- python3-网络数据下载
- 电影 | 治愈心灵必看的3部电影
- C#和服务器上虚拟机内PLCSIM通信
- npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for
- 写给程序员的 MySQL 面试高频 100 问,看完吊打面试官!
- RFID开发 IPJ标签信息识别以及数据存储
- 星外服务器显示,星外虚拟主机管理系统关于权限的综合说明