Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!