题目大意:求出一年十二个月Larry平均每个月得到的利息

读入:12行每行一个浮点数

关于控制浮点数输出位数的资料:https://blog.csdn.net/hsliwei/article/details/6914774

 package poj.ProblemSet;

 import java.text.DecimalFormat;
import java.util.Scanner; public class poj1004 {
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);
double sum=0.0;
for (int i = 0; i < 12; i++)
sum+=cin.nextDouble();
DecimalFormat ans = new DecimalFormat(".00");
//.00表示保留的两位小数位
System.out.println("$"+ans.format(sum/12));
}
}

Java-POJ1004-Financial Management的更多相关文章

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

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

  2. POJ1004 Financial Management

    题目来源:http://poj.org/problem?id=1004 题目大意: Larry今年毕业并找到了工作.他开始赚很多的钱,然而他似乎总觉得不够.Larry决定好好掌控他的资产,解决他的财务 ...

  3. Financial Management[POJ1004]

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

  4. Java Business Process Management(业务流程管理) 初识环境搭建

    一.简介 (一)什么是jbpm JBPM,全称是Java Business Process Management(业务流程管理),它是覆盖了业务流程管理.工作流.服务协作等领域的一个开源的.灵活的.易 ...

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

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

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

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

  7. Introduction to Financial Management

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

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

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

  9. Financial Management

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

  10. Financial Management POJ - 1004

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

随机推荐

  1. mongoose pushall不支持的错误记录

    该错误发生两次,第一次解决以后第二次碰到又没有想起来怎么解决. 因为采用mongoose+node的后端项目.有两个表实现多对多关系,再中间表不做关联,只在两个主表做了 testlist: [{ ty ...

  2. react 中 函数bind 和箭头函数

    用bind形式 方便测试,含有this时候最好用bind形 其他情况用箭头函数 含有this的时候也可以用箭头函数

  3. pyecharts学习笔记2

    目录 line bar grid overlap tap 这个画图是真的美观.香嘛? line 普通折线图 bar 柱状图 grid 可以让不同类型的图展示到同一个画面上 overlap 叠加 tap ...

  4. Android_AsyncTask异步类

    ·AsyncTask是一个轻量级的异步抽象类 ·Android程序刚启动时,会同时启动一个像一个的主线程,这个主线程主要负责处理与UI有关的事件,有时也被称为UI线程,Android app中必须遵循 ...

  5. Python之旅第五天(习题集合)

    4天时间,虽然上着班,但是学的东西还是有点多,而且晚上看的比较容易忘,所以今天是习题模式,正好教程也是这么要求的,本来以为时间不长,没想到还是很崩溃啊.不多说,上干货. #关于随机产生验证码同时验证用 ...

  6. Google Waymo 2017自动驾驶安全技术报告(一)

    2017年10月Google Waymo向美国交通部提交了一份43页的安全报告,报告中详细说明了Waymo如何装备和训练自动驾驶车辆,从而避免驾驶中的一般和意外情况发生.这份报告对Waymo的自动驾驶 ...

  7. 根据指定id取出数组中指定对象

    // 需求:根据Id取出数组中指定的对象 let arr = [ { id: 1, rotationAngle: 330, target: '目标1' }, { id: 2, rotationAngl ...

  8. react-React深入-一等公民-props-onChange

    title: '[react]深入 - 一等公民 props & onChange' date: 2017-08-23 10:05:07 tags: react reactjs props o ...

  9. 重新机兵回归(MMR)

    重新机兵回归记录 S/L法 Save / Load 法 . 在关键战斗前,先save一把 , 在结算奖励后如果奖励不好 , 再重新load再来过 . 比如说拿红牡丹等 . 还可以在逃跑时用此法 . 随 ...

  10. sqlserver删除所有表、视图、存储过程

    declare proccur cursor     for         select [name] from sysobjects where type='P' declare @procnam ...