Hello everyone,
I need to write a simple program. After I input the cost of an entree, drink, and dessert, it should calculate the cost of a meal and its tax. However, when I compile my code, I get five script errors. Can you tell me what's wrong and how I can fix it?
import java.io.*
import java.util.Scanner
public class foodcalc
{
public static void main (
String [] args)
{
Scanner input = new Scanner (System.in);
systemout.println ("Enter price of entree");
double extraCost = input.nextdouble ();
systemout.prinln ("Enter price of drink");
double extraCost = input.nextdouble ();
systemout.println ("Enter price of dessert")
double extraCost = input.nextdouble ();
double foodCost = entreeCost + drinkCost + dessertCost;
double taxAmt = foodCost * 0.10 ;
System.out.println ("Total cost is $ " + (int)(mealCost * 100 /100.0);