A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input, output the subtotal for the pizzas, and then output the total after applying a sales tax of 6%. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("Subtotal: %.2f\n", yourValue); Ex: If the input is: 3 the output is:

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 16PE
icon
Related questions
Question

in java pls

 

A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input, output the subtotal for the pizzas, and then output the total after applying a sales tax of 6%.

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
System.out.printf("Subtotal: %.2f\n", yourValue);

Ex: If the input is:

3

the output is:

Subtotal: $29.97 Total due: $31.77
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT