Assignment #27
Code
/// Name: Kabir Virk
/// Period: 6
/// Program Name: Sequencing
/// File Name: Sequencing.java
/// Date Finished: 10/5/2015
import java.util.Scanner;
public class Sequencing
{
public static void main( String[] args )
{
// BROKEN
Scanner keyboard = new Scanner(System.in);
double price = 7.99, salesTax = .66, total;
salesTax = price * 0.0825;
total = price + salesTax;
System.out.print( "How much is the purchase price? " );
price = keyboard.nextDouble();
System.out.println( "Item price:\t" + price );
System.out.println( "Sales tax:\t" + salesTax );
System.out.println( "Total cost:\t" + total );
}
}
Picture of the output