Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It is March 14, and the bakery is holding a pie sale. All pies with a regular price of S10 or more are $3.14 off.
It is March 14, and the bakery is holding a pie sale. All pies with a regular price of S10 or more are $3.14 off. All others are $1.00 off. Write a program that reads the price of a pie and prints the discounted price. Complete the following file PieSale.java 1 import java.util.Scanner; 3 public class Piesale 4 5 6 public static void main(String[] args) Scanner in - new Scanner (System.in); System.out.print("Original price: "; double price in.nextDouble); double discountedPrice; 9 10 12 13 14 15 16 17 18 19 20 21 else System.out.printf("Discounted price: %.2f ", discountedPrice); 23 Submit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started