Question: Write a program (name your class FirstJava Program) that finds and displays the sun of three integers. Declare three integer variables x and z. Assign

Write a program (name your class FirstJava Program) that finds and displays the sun of three integers. Declare three integer variables x and z. Assign them values. Compute the sum of these values and print it to the screen using System.out.print(). b) Expand the program from 1(a) so that it also finds the average of the three numbers. Hint: Try dividing by 3.0 instead of 3 to get the fractional part in the answer. The numbers with a fractional part have a type double not int).

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!