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
Get step-by-step solutions from verified subject matter experts
