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

HELPP RUNNING OUT OF TIME Which number is missing in the table of values below? X COLUMN IS 0,1,2,3,4, AND Y COLUMN IS 1,6,36,?,1,296 A 108 B 216 C324 D 648
Rebecca Whitaker purchased a new flat screen television for $767. She made a 20% down payment and financed the remainder. What amount did she finance? $767.00 $
What kind of therapist might a client with strong religious beliefs prefer and benefit from?
How much did jesus teach after his resurrection?
How can you show good sportsmanship in a difficult situation?
Adeline, age 90, still drives her car to the senior center every friday. last week she tells you that someone you know from her church died. when you ask her fo
The perimeter of a rectangle is dependent on the length of each of its sides. Suppose the base of a rectangle is two more than its height. Explain what each pai
What increases the ability to see at night? A. an increased number of cone cells B. an increased number of rod cells C. more cone cells than rod cells D. an equ
How are successors to government offices chosen in the United States?
fill in the blank in the triangle below y= round your answer two decimal places