Question: In Java Programming 8th edition chapter 9 #2-part b(MeanMedian2). How do I fix the following? L50: median=(list[m]+list[m-1])/2; I also had median=(double)(list[m]+list[m-1])/2; My professor still says..

In Java Programming 8th edition chapter 9 #2-part b(MeanMedian2). How do I fix the following?

L50: median=(list[m]+list[m-1])/2;

I also had median=(double)(list[m]+list[m-1])/2;

My professor still says..

I still don't see any type conversion here. If you don't like a type conversion. You can use this way: change a constant 2 to a double 2.0. So, 2 ==> 2.0 (This is a convenient way to avoid an integer division).

I have never done a programming class and I still dont understand what to fix. Please help!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!