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 is an example of an energy transformation?
erica [24]

Answer:

D

Explanation:

8 0
3 years ago
What is the lowest temperature a human can survive?
algol [13]
Suprysingly , Humans can survive weather well since we wear clothing.
A good estimate of how cold a human can survive would be in the range of -50 or lower.
HOPE IT HELPS!
3 0
3 years ago
Question 10
zepelin [54]
Because the ring is hollow
3 0
3 years ago
The instruction booklet for your pressure cooker indicates that its highest setting is 11.8 psipsi . You know that standard atmo
zavuch27 [327]

<u>Answer:</u> The temperature at which the food will cook is 219.14°C

<u>Explanation:</u>

To calculate the final temperature of the system, we use the equation given by Gay-Lussac Law. This law states that pressure of the gas is directly proportional to the temperature of the gas at constant pressure.

Mathematically,

\frac{P_1}{T_1}=\frac{P_2}{T_2}

where,

P_1\text{ and }T_1 are the initial pressure and temperature of the gas.

P_2\text{ and }T_2 are the final pressure and temperature of the gas.

We are given:

P_1=14.7psi\\T_1=273K\\P_2=(14.7+11.8)psi=26.5psi\\T_2=?

Putting values in above equation, we get:

\frac{14.7psi}{273K}=\frac{26.5psi}{T_2}\\\\T_2=\frac{26.5\times 273}{14.7}=492.14K

Converting the temperature from kelvins to degree Celsius, by using the conversion factor:

T(K)=T(^oC)+273

492.14=T(^oC)+273\\\\T(^oC)=219.14^oC

Hence, the temperature at which the food will cook is 219.14°C

7 0
3 years ago
What four properties do all waves have in common
Nina [5.8K]

The different types of motion

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the compound of KCN called
    12·2 answers
  • The ___ vapor pressure at high altitudes causes a liquid to boil at a ____ temperature.
    13·2 answers
  • How many substances does a pure piece of matter contain? <br> A. 0 <br> B. 1 <br> C. 2 <br> D. 3
    14·1 answer
  • Equal volumes of two monoprotic acid solutions (A and B) are titrated with identical NaOH solutions. The volume to reach the equ
    8·2 answers
  • How are bases named?
    14·2 answers
  • The mass of a dust particle would be measured in?
    8·1 answer
  • If Lead (II) nitrate reacted with iron (III) acetate what would the balanced formula be?
    13·1 answer
  • A gas has a volume of 4 liters at 50 oC. What will its volume be (in liters) at 100oC
    12·1 answer
  • I need to right a journal entry for school but i don't know what to put Write a journal entry from the perspective of a particle
    9·1 answer
  • What is the [H3O+] if the [OH-] is 1 x 10 -8?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!