002-003-004
Numeric Input: Shopping Calculator
Easy
Problem Description
Numeric Input: Shopping Calculator
In this problem, you will create a program that reads product price and quantity from the keyboard using the Scanner class, calculates the total amount, and displays the result to standard output.
Learning Objective
Learn how to input numbers from the keyboard.
Problem
Create a program that inputs product price and quantity, then calculates the total amount.
Input
Line 1: Product price (integer)
Line 2: Quantity (integer)
Output
Price: [price]
Quantity: [quantity]
Total: [total]
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up