Assignemnt #23 Variables that only holds Values

Code

    ///Name: JJ Deng
    ///Period: 6
    ///Program Name: Variables Only Hold Value
    ///File Name Value.java
    ///Date Finished: 10/8/15
    
    import java.util.Scanner;
    
    public class Value
    {
        public static void main( String[] args )
        {
            // FIXED
            
            Scanner keyboard = new Scanner(System.in);
            double price, salesTax, total;
            
            System.out.print( "How much is the purchase price? " );
            price = keyboard.nextDouble();
            
            salesTax = price * 0.0825;
            total = price + salesTax;
            
            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

Assignment 22