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