cheerkennedym5520 cheerkennedym5520
  • 19-02-2020
  • Mathematics
contestada

You have three int variables called a, b and c. Write a Java statement which creates a variable d and assigns its value to the mean of a, b and c.

Respuesta :

fahadisahadam
fahadisahadam fahadisahadam
  • 21-02-2020

// creates variable

int a;

int b;

int c;

// Now assign value to a variable

// let me give them a value

a = 10;

b = 20;

c = 30;

mean= (a + b + c ) / 3;

// print mean

System.out.println("The mean is : " + mean);

The out will be 20.

Answer Link

Otras preguntas

Valerie buys 3 video games from ebay,each for the exact same price.She pays $10 for shipping.Her total bill=
HELP PLEASE Evaluate x-4/2 when x = –1.6.
write one number that is 3.45 and 4.25
In the past you paid $800 per month to rent your apartment. You now pay $900 per month for your rent. What is the percent increase in your rent?
By 1860, the number of miles of railroad tracks throughout the United States had risen to
The Ku Klux Klan formed during Reconstruction with the purpose of (A) fi ghting Union armies stationed in the South (B) keeping African-Americans from exercis
Of 140 seventh-grade students, 15% earn the Presidential Physical Fitness Award. How many students earn the award?
I need to predict why is there a lost colony. Predict it for me. (Just why there is a lost colony?)
A chemist weighed three separate test samples at 0.17 gram, 0.204 gram, and 2.3 grams. What is the total weight of the three samples? A. 2.521 grams
Which of the following was the site of the most serious conflict of the Pequot War? a Wampanoag grain storage bin a Pequot fort at Mystic a Pequot settlement in