Yes, I am new, but am eager to learn from my mistakes. I am trying to calculate the total price with sales tax, the total amount due,, the amount paid, and print the number of dollars, quarters, etc to the screen. I am getting these 4 errors, and don't know what to do to correct them.
Here is my code:
import java.util.Scanner;
public class sales
{
public static void main(String[] args)
{
//Initialized objects.
String name;
double unitprice,totalprice,totaldue,amountpaid,change,to talpaid,
no_dollars,no_quarters,no_dimes,no_nickles,no_penn ies;
int item_num;
final double tax=(0.0925);
//Input for calculations.]
Scanner input=new Scanner(System.in);
System.out.println("Enter the name of the product ");
name=input.nextString;
System.out.println("Enter the unit price of the product ");
unitprice=input.nextDouble();
System.out.println("Enter the number of items sold ");
item_num=input.nextInt;
System.out.println("You paid "+amountpaid);
amountpaid=input.nextDouble;
//Calculations.
totalprice=(unitprice*item_num);
totaldue=totalprice*tax;
change=totalpaid-totaldue;
no_dollars=(int)(change)/1.00;
System.out.println("The number of dollars of change you receive is "+no_dollars);
no_quaters=(change-no_dollars)%0.25;
System.out.println("The number of quarters of change you receive is "+no_quarters);
no_dimes=(change-(no_dollars+no_quarters))%0.10;
System.out.println("The number of dimes of change you receive is "+no_dimes);
no_nickles=(change-(no_dollars+no_quarters+no_dimes))%0.05;
System.out.println("The number of nickles of change you recevie is"+no_nickles);
no_pennies=(change-(no_dollars+no_quarters+no_dimes+no_nickles))%0.01 ;
System.out.println("The number of pennies of change you receive is"+no_pennies);
}}