1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MArishka [77]
3 years ago
14

Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints out their values on sep

arate lines with proper labels, followed by their average with proper label. Comment your code properly. Format the outputs following the sample runs below.
Sample run 1:
X = 3
Y = 2
Z = 4
Average = 3.0
Sample run 1:
X = 7
Y = 8
Z = 10
Average = 8.333333333333334
Sample run 1:
X = 7
Y = -3
Z = -5
Average = -0.3333333333333333
Chemistry
1 answer:
rjkz [21]3 years ago
3 0

Answer:

class sum (

public static void sumofvalue (int m, int n, int p)

{

System.out.println(m);

System.out.println(n);

System.out.println(p);

int SumValue=m+n+p;

System.out.println("Average="+Sumvalue/3);

}

)

Public class XYZ

(

public static void main(String [] args)

{

sum ob=new sum();

int X=3;

int X=4;

int X=5;

ob.sumofvalue(X,Y,Z);

int X=7;

int X=8;

int X=10;

ob.sumofvalue(X,Y,Z);

}

)

Explanation:

The above program is made in Java, in which first we have printed value in a separate line. After that, the average value of those three values has been printed according to the question.

The processing of the program is given below in detail

* The first one class named 'sum' has been created which contains the function to print individual value and the average of those three values.

* In seconds main class named 'XYZ', the object of that the above class had been created which call the method of the above class to perform functions.

* In the main class values are assigned to variables X, Y, Z.

You might be interested in
Paano napaunlad ng mga Latin ang Rome at ano ang natulong ng mga Etruscan sa kanila?​
Hitman42 [59]

Answer:

yesakskakakakakakkawbajajjakaak

7 0
3 years ago
Many food chains together create a______
Amanda [17]
Many food chains together create a food web.


hope this helps,, have a nice day :))
3 0
2 years ago
Total number of atoms in 4so2​
Sunny_sXe [5.5K]

Answer:

10

s=8

o=2

Hope it helps to

3 0
2 years ago
Who made the periodic table?
swat32
Nobody specifically made the periodic table but it was first thought of by Dmitri Mendeleev in 1869.
7 0
3 years ago
Read 2 more answers
Preparing a meal involves both physical and chemical changes. Which involves a chemical change?
nataly862011 [7]
ANSWER: boiling water

Explanation: the others are physical changes
8 0
2 years ago
Read 2 more answers
Other questions:
  • What is the total number of strontium and phosphate ions you have added to your solution after two or three shakes? why are ther
    11·1 answer
  • A chemist wants to make 6.5 L of a 0.340 M CaCl2 solution. Part A What mass of CaCl2 (in g) should the chemist use? Express your
    5·1 answer
  • Which equation is used to calculate the specific heat of the metal?
    5·1 answer
  • No pure elements are liquids at room temperature.
    11·1 answer
  • Jumping on a cemented floor is more pain full than a sandy flour,why​
    15·1 answer
  • How many protons and neutrons are there in an atom of 3.K?
    7·1 answer
  • Which statement would indicate the presence of an acid?
    8·2 answers
  • Help I’m timed!
    7·1 answer
  • What is ph level of acid rain​
    14·1 answer
  • Please solve ...................................................................
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!