finding the discount rate

finding the discount rate - double totalAmount =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* *finding the discount rate. */ package interestrate; import java.util.Scanner ; /** * * @author Manuel Duenas */ public class InterestRate { /** * @param args the command line arguments */ public static void main(String[] args) { // Input final double SALES_TAX_RATE = .085; System.out.println("Please enter total amount spent: "); Scanner in = new Scanner(System.in);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double totalAmount = in.nextDouble(); double finalPayment = 0; if (totalAmount < 100) { finalPayment = totalAmount * (1 - 0.1)* (1 + SALES_TAX_RATE); } else { finalPayment = totalAmount * (1 - 0.2) * (1 + SALES_TAX_RATE); } System.out.printf("Total Amount = $%,.2f\n", totalTotal); }...
View Full Document

This note was uploaded on 12/07/2011 for the course BUS 350 taught by Professor Leighjin during the Fall '11 term at S.F. State.

Ask a homework question - tutors are online