Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions