Here is the error:
01C.java
Program01C.java :9: <identifier> expected
import static java.lang.Math. *;
^
Program01C.java :9: '.' expected
import static java.lang.Math. *;
^
2 errors
Here is the code:
I've gotten it to compile before so idk why it isn't working now. Any ideas?
01C.java
Program01C.java :9: <identifier> expected
import static java.lang.Math. *;
^
Program01C.java :9: '.' expected
import static java.lang.Math. *;
^
2 errors
Here is the code:
Code:
//Robert Burns
//Feb. 5, 2009
//paradox6996@gmail.com
//Program01B-Calculates total average of test scores
import java.util.Scanner;
//Math class so I can truncate doubles to get nice looking decimals
import static java.lang.Math.*;
public class Program01C {
public static void main(String[] args) {
double purchase, totalTax, salesTax, countyTax, total, totalSalestax, totalCountytax;
salesTax = 0.04;
countyTax = 0.02;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter the Amount of Purchase:");
purchase = keyboard.nextDouble();
totalSalestax = (purchase * salesTax);
totalCountytax = (purchase * countyTax);
totalTax = (salesTax + countyTax);
total = (((totalTax) * purchase) + purchase);
System.out.printf("Sales Tax: " + totalSalestax + "\nCounty Tax: " + totalCountytax + "\nTotal Sales Tax: " + totalTax + "\nPurchase Amount: " + purchase + "\nTotal Amount: %.2f", total, Math.ceil(total));
Comment