Prepare a program that can read the price (RM) of two books. Calculate and print the total price (RM) of the two books that includes 5% discount.

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

Computer Science

Title: Programming - Practical Test 1 - SET 3
Learning Objective:
Write simple Java programs using basic data types, operators and expressions.
Write Java programs using control structures - Sequence

Question:
Prepare a program that can read the price (RM) of two books. Calculate and print the total price (RM) of the two books that includes 5% discount.
. Based on the given problem, the student need to:
i. Write the Java program
ii. Display the output
[100% marks]

Sample input and output:
Input price of book 1 : 50.50
Input price of book 2 : 90.90
Total price : 141.4
Discount : 7.07
Net paymant : 134.33



help me please asap. 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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