Question: ( 2 0 ) 1 0 . Write a complete Java main method that will: Read the int values into iA and iB using a

(20)10. Write a complete Java main method that will:
Read the int values into iA and iB using a Scanner object. Prompts
are not required!!!
Print the values of iA and iB, as shown below.
Compute and print the average of iA and iB, only showing 2 decimal
places as shown below.
Sample output for an input of 143:
iA}=1
iB =3
The average of iA and iB is 8.50.
Note: This is only an example; your code must be general,
that is, it must work for any input values!
You may declare any additional variables that you need.
import java.util.Scanner;
public class Exam1
{
( 2 0 ) 1 0 . Write a complete Java main method

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 Programming Questions!