描述
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(int argc, char const *argv[]) {//char *argv[]是一个字符数组,其大小是int argc,主要用于命令行参数argv[]
3 double sum = 0, a;
4 int n = 12;
5 while(n--) {
6 scanf("%lf", &a);//%lf双精度浮点型数据(也就是double)的输入格式控制符
7 sum += a;
8 }
9 printf("%.2lf\n", sum/12);
10 return 0;
11 }

72.Financial Management的更多相关文章

  1. poj 1004:Financial Management(水题,求平均数)

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 126087   Accepted: ...

  2. Financial Management[POJ1004]

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 179458   Accepted: ...

  3. 练习英语ing——[POJ1004]Financial Management

    [POJ1004]Financial Management 试题描述 Larry graduated this year and finally has a job. He's making a lo ...

  4. Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 164431   Accepted: ...

  5. Introduction to Financial Management

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

  6. [POJ] #1004# Financial Management : 浮点数运算

    一. 题目 Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 173910   Acc ...

  7. Financial Management

    Financial Management 时间限制:3000 ms  |  内存限制:65535 KB 难度:1   描述 Larry graduated this year and finally ...

  8. Financial Management POJ - 1004

    Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...

  9. UVA 11945 Financial Management 水题

    Financial Management Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 acm.hust.edu.cn/vjudge/problem/vis ...

随机推荐

  1. P3309-[SDOI2014]向量集【线段树,凸壳】

    正题 题目链接:https://www.luogu.com.cn/problem/P3309 题目大意 \(n\)个操作 在序列末尾加入一个向量\((x,y)\) 询问加入的第\(l\sim r\)个 ...

  2. nodejs安装 及环境变量配置教程 超详细版

    ------------恢复内容开始------------ ------------恢复内容开始------------ 上篇文件 写到  遇到了两个棘手问题  : @终端进程启动失败: shell ...

  3. 安装SpaCy出现报错:requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443):

    内含安装步骤及报错解决:https://www.cnblogs.com/xiaolan-Lin/p/13286885.html

  4. Geocoding Tools(地理编码工具)

    地理编码工具 # Process: 创建地址定位器 arcpy.CreateAddressLocator_geocoding("", "", "&qu ...

  5. C#开发BIMFACE系列49 Web网页中加载模型与图纸的技术方案

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在BIMFACE二次系列博客中详细介绍了服务器端API的调用方式,如下列表 C#开发BIMFACE系列1   BIMFAC ...

  6. 初识Tomcat源码

    Tomcat 部署的三种方式 打包成war包 部署到webapp目录录下 为什么要打包成war包,而不是jar包呢? 因为jar包可能是一个项目,也可能是一个依赖,Tomcat读取容易造成混淆.于是一 ...

  7. SpringMVC、Spring、MyBatis整合(IDEA版)

    1 环境准备 1.1 软件架构 JDK 1.8 Spring 4.x Mybatis 3.x Maven 3.x MySQL 5.7 1.2 创建数据库 创建数据库,数据库名ssm-demo,字符集u ...

  8. 【c++ Prime 学习笔记】目录索引

    第1章 开始 第Ⅰ部分 C++基础 第2章 变量和基本类型 第3章 字符串.向量和数组 第4章 表达式 第5章 语句 第6章 函数 第7章 类 第 Ⅱ 部分 C++标准库 第8章 IO库 第9章 顺序 ...

  9. better-scroll快速上手及封装(vue项目)

    愿你有诗有梦,有坦荡荡的远方 本文声明:这是一篇学习coderwhy老师的vue2课程的一个笔记,所以本文章是在vue项目中实现,没学过vue的大佬们可以举一反三. 使用场景及介绍 BetterScr ...

  10. Coursera Deep Learning笔记 卷积神经网络基础

    参考1 参考2 1. 计算机视觉 使用传统神经网络处理机器视觉的一个主要问题是输入层维度很大.例如一张64x64x3的图片,神经网络输入层的维度为12288. 如果图片尺寸较大,例如一张1000x10 ...