Consider the following code segment. int x = 5; int y = 6; /* missing code */ z = (x + y) / 2; Which of the following can be use
d to replace /* missing code */ so that the code segment will compile? I.int z = 0; II.int z; III.boolean z = false;
1 answer:
Answer:
II. int z;
Step-by-step explanation:
int z;
is the best option, because on the next line you will define the variable as
z = (x + y) / 2;
you can also use int z=0; but it is not necessary according to the code segment given.
You might be interested in
Answer:
2 Function B
Step-by-step explanation:
Answer:
Length: 360. Width: 240.
Step-by-step explanation:
360 * 2 = 720
240 * 2 = 480
720 + 480 = 1,200
Answer:
1+6y= "7y=7"
1+5y= "6y=4"
Step-by-step explanation:
X represents "1" so you replace your "X" with "1" and solve the equation.