/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.mp1_calebfontenot;

import java.util.Scanner;

/**
 *
 * @author caleb
 */
public class Total {
    public static void main(String[] args)
    {
        // Define variables:
        double subtotal;
        double gratuity;
        double total;
        
        // Get subtotal and gratuity rate
            // Setup Scanner
        Scanner input = new Scanner(System.in);
        
            // Get vars
        System.out.print("Enter subtotal and gratuity rate: ");
        subtotal = input.nextDouble();
        gratuity = input.nextDouble();
        
        // Calculate
            // Convert gratuity into a decimal because its a percentage:
        gratuity = (gratuity / 10); //* 10;
        
        total = (subtotal + gratuity);
        
        // Print result
        System.out.println("The gratuity is $"+gratuity+" and the total is $"+total);
        
    }
}
