2,4,6,8,n,3,5,7,9 If n is an integer between 1 and 10, Inclusive, What is the median?

2,4,6,8,n,3,5,7,9

If n is an integer between 1 and 10,

Inclusive

What is the median?

a. 4 or 5

b. 5 or 6

c. 6 or 7

d. N

e. 5.50

Why is the answer b.

how?

walk me through.

thanks

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    To find the median, you lay out the numbers from least to greatest:

    2,3,4,5,6,7,8,9

    you just have to find the number that is in the middle of it, what I usually do is put both fingers on each end of the numbers and move them in inward towards the center until i have one or two numbers

    If it is one number, than that is the median, if it is two numbers, than add up the two numbers and divide by two, so the median of this problem is e. 5.50, BUT, it asked for an INTEGER, so that is a whole number, so it is 5 or 6.

  • 4 years ago

    next,you will need to decrease the variable that memorises the attempts, you have not declared yet. so first you declare the variable int attempt and k that you increase if the entry is right; than: int attempt,k=0; while(attempt>0||k==0) { printf( "Enter a number: " ); /* prompt user */ scanf( "%d", &num ); /* read two integers */ if ( num < 0 && num > 10) { printf( "You have entered a valid entry, Goodbye \n" ); k=1; for ( x = 1; x <= num; x++){ /* associate numbers to asterisks and show output */ printf("*"); } printf( "\n" ); } /* end if */ else { printf(" You have entered an invalid entry \n"); attempt=attempt-1; printf(attempt" attempts left,try again\n"); } }

Still have questions? Get your answers by asking now.