题目7 20140306 20:04
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*/

 1 #include<stdio.h>
 2   int main(){
 3        int n=12;
 4       double sum=0.00;
 5         while(n--){
 6              double a;
 7               scanf("%lf",&a);
 8                  sum=sum+a;
 9         }  printf("%g",sum/12);//  %g表示一%f %e中较短的输出宽度输出单双精度数
10         return 0;
11   }
12
13
14  /*
15   #include<stdio.h>
16   int main(){
17        int n=12;
18       double sum=0.00;
19         while(n--){
20              double a;
21               scanf("%lf",&a);
22                  sum=sum+a;
23         }  printf("%.2f",sum/12);
24         return 0;
25   }
26   */  

转载于:https://www.cnblogs.com/acmgym/p/3676341.html

Financial Managemen相关推荐

  1. 题目1148:Financial Management

    /*** 题目描述:Larry graduated this year and finally has a job. He's making a lot of money, but somehow n ...

  2. SWIFT(Society for Worldwide Interbank Financial SWIFT Telecommunications---环球同业银行金融电讯协会)

    SWIFT 百科名片 SWIFT又称:"环球同业银行金融电讯协会",是国际银行同业间的国际合作组织,成立于一九七三年,目前全球大多数国家大多数银行已使用SWIFT系统.SWIFT的 ...

  3. Introduction to Financial Management

    Recently,i am learning some useful things about financial management by reading <Essentials of Co ...

  4. 文献记录(part31)--Dynamic relationship identification for abnormality detection on financial time ...

    学习笔记,仅供参考,有错必究 关键词:虚假关系模式:动态关系矩阵:异常检测 文章目录 Dynamic relationship identification for abnormality detec ...

  5. [中文事件抽取]DCFEE: A Document-level Chinese Financial Event Extraction System based on Automatically Lab

    [中文事件抽取]DCFEE: A Document-level Chinese Financial Event Extraction System based on Automatically Lab ...

  6. 财务管理c语言oj,九度OJ 1141:Financial Management (财务管理) (平均数)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:939 解决:489 题目描述: Larry graduated this year and finally has a job. He's ...

  7. NUC1011 Financial Management【数学计算+水题】

    Financial Management 时间限制: 1000ms 内存限制: 10000KB 问题描述 Larry graduated this year and finally has a job ...

  8. bzoj 3372: [Usaco2004 Feb]Moo University -- Financial Aid 财政补助(set+贪心)

    3372: [Usaco2004 Feb]Moo University -- Financial Aid 财政补助 Time Limit: 10 Sec  Memory Limit: 128 MB S ...

  9. Roles of financial reporting standard-setting bodies and regulatory authorities

    转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/127083781 本文出自[我是干勾鱼的博客] standard-setting ...

最新文章

  1. 不同Activity之间传递数据--Bundle对象和startActivityForResult方法的实现
  2. 一次非常有意思的sql优化经历
  3. NET问答: C# 中有哪些 HttpPost 工具包
  4. 第一款Micropython图形化编辑器—Python Editor
  5. DockerFile : COPY 和 ADD 命令不能拷贝上下文之外的本地文件
  6. NOIP2007 T1奖学金 解题报告-S.B.S.
  7. JVM监控及诊断工具命令行篇之jcmd
  8. 在windows 2003系统上安装诺基亚pc套件的方法
  9. 一款精简的webshell管理工具 -- Assassin
  10. 维特比算法(Viterbi algorithm) 的理解
  11. 旧手机物联网_而立之年“裸辞”,他用废旧手机搭建庞大物联网,为救600000公顷森林...
  12. RabbitMQ 之集群模式
  13. 配色表和配色网站:获取好看的配色
  14. 咸鱼Maya笔记—渲染基础
  15. ACM 投稿时CCS CONCEPTS 生成及插入
  16. Python画各种爱心
  17. FPGA ISE PROMs下载程序问题
  18. 安装Docker Desktop报错WSL 2 installation is incomplete的问题(解决报错)
  19. 【Pyecharts50例】渐变色散点图/径向渐变/scatter/由圆心向圆周渐变
  20. Lostash event API详解

热门文章

  1. FAST算法学习笔记
  2. TensorFlow2.0正式版安装
  3. qr分解求线性方程组_矩阵分解
  4. Linux——RHCE试题与答案详解
  5. Java接口自动化之Maven工具使用
  6. 搜狗2020年测试工程师笔试题
  7. Tendermint推出2000万美元风投基金,促进Cosmos发展
  8. Polkamarkets推出Uniswap流动性计划
  9. 去中心化借贷协议24小时清算超1300万美元
  10. CentOS 7.3 关闭默认防火墙远程登录