Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

public class salesTax2

{
public static void main(String[] args)
{

int Ecoast_sales;
double money;
double total_sales;
Ecoast_sales = 46000000;
money = 0.62;
total_sales = Ecoast_sales * money;

System.out.println(" The East Coast division will generate: " + total_sales);


}
}

import java.util.*;
public class Restaurant_Bill
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Please enter the total amount of you reciept: $");
int a = keyboard.nextInt();
double tax;
double tip;
double bill;

tax = 0.0675 * a ;
tip = (tax + a) * 0.2;
bill = tax + tip + a ;

System.out.println("You have spent: $" + a + " on your meal");


System.out.println("The total tax count is: $" + tax);
System.out.println("$" + tip + " was given as extra compensation" +
"\nYour contribution is apreciated");
System.out.println("You have spent: $" + bill);
}
}

You might also like