Assignemnt #27 A VariablesOnlyHoldVariables
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: VariablesOnlyHoldVariables
///File Name: VariablesOnlyHoldVariables.java
import java.util.Scanner;
public class VariablesOnlyHoldVariables
{
public static void main( String[] args )
{
// FIxed (At least I hope so)
Scanner momo= new Scanner(System.in);
double price, salesTax;
price= 7.99;
salesTax= .0825;
System.out.println( "Item Price: " + price + " " );
System.out.println( "Sales tax: " + salesTax + "");
System.out.println( "Total cost: " + ((salesTax*price)+(price)) + " ");
}
}
Picture of Output