/home/caleb/ASDV-Java/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/Total.java |
package com.calebfontenot.mp1_calebfontenot;
import java.util.Scanner;
@author
public class Total {
public static void main(String[] args)
{
double subtotal;
double gratuity;
double total;
Scanner input = new Scanner(System.in);
System.out.print("Enter subtotal and gratuity rate: ");
subtotal = input.nextDouble();
gratuity = input.nextDouble();
gratuity = (gratuity / 10);
total = (subtotal + gratuity);
System.out.println("The gratuity is $"+gratuity+" and the total is $"+total);
}
}