002-003-012
Inputting Multiple Numbers with Scanner
Medium
Problem Description
Inputting Multiple Numbers with Scanner
In this problem, you will create a program that uses Scanner to receive three space-separated integers on one line, calculates their sum and decimal average, and displays the result to standard output.
Learning Objective: Understand how to process multiple number inputs using Scanner
Overview
Receive three integers as input, calculate and output their sum and average.
Specifications
- Input three integers separated by spaces on one line
- Calculate and output the sum
- Calculate and output the average as decimal
Input Format
10 20 30
Output Format
Sum: 60
Average: 20.0
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