Question
java code write a program that, with given three integers from keyboard, determine whether each integer is odd, even, select largest and smallest, and calculate
java code write a program that, with given three integers from keyboard, determine whether each integer is odd, even, select largest and smallest, and calculate the sum, average, and product. Then, you display the results on the screen. You will use Scanner class to make user input, and use if statement to determine largest, smallest number as well as even or odd number.
variables: Define your variables and data type of each variable. Include Scanner and DecimalFormat class: Import Scanner classs and create Scanner object. Import DecimalFormat class and create DecimalFormat object Make use input rom keyboard: Input three integers from keyboard and save it to local variable should be one line input. Calculate sum, average, product,and determine whether each number is odd or even: Calculate sum, average and product save it to local variable. Determine odd or even and save it to local variable. Decide largest and smallest number: Select the largest number among three integers use if only statement only. Select the smallest number among three integers use if only statement only. Display the result on the screen your result should be formatt as follows: Print whether each number is odd or integers use if only statement only. Print largest, smallest, sum, average, and product of three integers
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