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

An investment club invested part of $8000 at 10% annual interest the rest at 12%. If the annual income from these investments is $900, how much was invested at
100 rational numbers can be inserted  between 2 and 7? give your views on this statement
what is 98% as a fraction
2700=2300(1+r)^5 solve for r Please show all work
How do I factor x^2+7×+6
what is 98% as a fraction
How do I factor x^2+7×+6
what does 'don't judge a book by the cover' mean?
What kind of organic compound is oxybenzone?
describe in your own words what is a 'fat cat'?