import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter the subtotal and a gratuity rate: ");

         double subtotal = input.nextDouble();
         double gratuityRate = input.nextDouble();

         double gratuity = subtotal * gratuityRate / 100.0;
         double total = subtotal + gratuity;

         System.out.println("The gratuity is " + gratuity + " and total is " + total);

         input.close();
     }
 }

最新文章

  1. CSS3 滤镜
  2. spin.js
  3. Unity学习疑问记录之保卫伦敦塔学习体会
  4. [.net 面向对象编程基础] (4) 基础中的基础——数据类型转换
  5. views中的公共代码放在一起
  6. yii2.0 DetailView 自定义样式
  7. vs2010 使用IIS EXPRESS出错.
  8. HDU 4642 (13.08.25)
  9. 永久修改python默认的字符编码为utf-8
  10. HTML语言笔记
  11. 【CH2401】送礼物
  12. idea注册码
  13. SQL Server 跨服务器操作
  14. 【Java】【12】精确的加减乘除运算
  15. Linux网络编程学习(十) ----- Socket(第六章)
  16. php之$_SESSION的理解
  17. Ubuntu 16.04安装idea
  18. AI的胜利,人类的荣耀
  19. ERROR getting 'android:label' attribute: attribute is not a string value
  20. 建立SIP通话

热门文章

  1. Android分类前言
  2. puppet中anchor的作用
  3. hdu 2222 Keywords Search ac自动机入门
  4. poj 1113 Mall
  5. myeclipse10.0优化
  6. SDC(5)–FPGA系统级同步输入的约束
  7. IOS开发—IOS 8 中设置applicationIconBadgeNumber和消息推送
  8. C++的构造函数和析构函数
  9. PHP ini_set() 函数
  10. 【NOIP 2012 国王游戏】 贪心+高精度