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
Which of the following would likely form a heterogeneous mixture? Sugar and waterSalt and waterSand and waterBaking soda and wat
kati45 [8]

Answer:

Sand and water

Explanation:

6 0
4 years ago
Read 2 more answers
In a water solution, HCl and NaOH react to form H2O and NaCl. Radium-226 undergoes alpha decay to form radon-222. The temperatur
ira [324]

Answer: B.

The rate of the nuclear reaction increases, but the rate of the chemical reaction remains the same

Explanation:

7 0
3 years ago
Read 2 more answers
a particular compound has the empirical formula CH2O. its molar mass is 240.0 g/mol. predict the molecular formula for this comp
jarptica [38.1K]
<span>The molecular formula is 8(CH2O)= C8H16O8.</span>
7 0
4 years ago
How many molecules of atp are produced as a result of glycolysis
Whitepunk [10]

Answer:

2 ATP molecules are produced

8 0
2 years ago
Read 2 more answers
On what two days would the UK, Chile, South Africa, and Japan have an equal amount of day and night? O Winter Solstice and Summe
mario62 [17]
I say both equinox because winter solstice has the least amount of sunlight and the summer solstice has the most ampunt of daylight so i said both equinox
4 0
3 years ago
Other questions:
  • What statement correctly defines dynamic equilibrium
    5·1 answer
  • What does it mean to be recyclable? What are a few recyclable materials?
    9·2 answers
  • Because oxygen is more electronegative than hydrogen, the water molecule isA. hydrophobicB. organicC. polarD. ionic
    8·1 answer
  • A biologist who is measuring the length of salmon as they travel upstream is collecting qualitative data. True or false ?
    5·2 answers
  • Rank and explain how the freezing point of 0.100 m solutions of the following ionic electrolytes compare. List from lowest freez
    8·1 answer
  • How many formula units are in one mole of magnesium hydroxide?
    6·1 answer
  • 29.2 grams of methane (carbon tetrahydride), CH4, is how
    7·1 answer
  • What is the percent by mass of Ca in calcium chloride, CaCI2 (show your work)
    12·1 answer
  • What is the molarity of an aqueous solution that contains 78g of C6H12O6 dissolved in 2500 mL of solution?
    11·1 answer
  • What is the ratio of the areas of the signals in the h nmr spectrum of pentan-3-ol?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!