Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program in Java with the following requirements: Using a Scanner and print statements, ask the user to input 3 numbers. Use Javas int
Create a program in Java with the following requirements:
- Using a Scanner and print statements, ask the user to input 3 numbers. Use Javas int data typedont worry about error checking for this assignment (assume the user doesnt try to break your program)
- Store these three numbers into three variables
- Calculate the sum of all three numbers
- Calculate the product of all three numbers
- If all three numbers are even, output Lucky Duck!
- If all three numbers are odd, output How Odd!
- Output the largest of the three numbers
Example of a result:
enter the first number: 2
enter the second number: 8
enter the third number: 6
sum is 16
product is 96
Lucky Duck!
largest is 8
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started