Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Samsung Galaxy S23 Ultra Comprehensive User Manual

Authors: Leo Scott

1st Edition

B0BVPBJK5Q, 979-8377286455

More Books

Students also viewed these Databases questions

Question

What is short-term momentum, and what are long-term reversals?

Answered: 1 week ago