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

The dirty sock in the refrigerator sent the ​"neat roommate" a clear message ? indirect object
I NEED HELP IN 30 MINUTES!!!!! PLEASE HELP!!!! Where on a number line is the set of numbers x for which: a) |x|<1 b) |x|<5 c) |x|>3
(90 POINTS FOR ANSWERING IF YOU DON'T ANSWER CORRECT I WILL REPORT THE ANSWER) One day, you are selected to be interviewed to work at the National Security Agen
What’s 3 4/5 divided by 1/4? -20 points
Who was the 2nd president? A. George Washington B.John Adams C.Abraham Lincoln
math questions help thanks, much appreciated <3
Which graph represents the solution set of the system of inequalities? {y≤2x+1y>−2x−3
B. Who spent more of their allowance on pizza? Write an inequality to compare the portion spent on pizza
How to isolate t in 3tx-5x=(t+2)(t-3)-t^2-1/x
Which function represents the cost of a pizza with n Toppings