-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy path1.5.7 Night Out
24 lines (23 loc) · 1.01 KB
/
1.5.7 Night Out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.util.*;
public class NightOut
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
// Start here!
System.out.println("How much does dinner usually cost?");
double dinnerCost = input.nextDouble();
System.out.println("How much is laser tag for one person?");
double laserTagCost = input.nextDouble();
System.out.println("How much does a triple scoop cost?");
double iceCreamCost = input.nextDouble();
double totalDinnerCost = (dinnerCost * 2) + dinnerCost;
double totalLaserTagCost = laserTagCost * 2;
double totalIceCreamCost = (iceCreamCost / 3) + iceCreamCost;
double totalSum = totalDinnerCost + totalLaserTagCost + totalIceCreamCost;
System.out.println("Dinner: $" + totalDinnerCost);
System.out.println("Laser Tag: $" + totalLaserTagCost);
System.out.println("Ice-cream: $" + totalIceCreamCost);
System.out.println("Grand Total: $" + totalSum);
}
}