SophiaPretty

(4)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 116 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15841

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 04 Dec 2017 My Price 10.00

float finalmedian,array[N],temporary;

i just want median show nothing . example the median is ....

RANA MOHMEDSIDDIK

INTRO TO PROGRAMMING

FINAL PROJECT

MAURICIO MAURER

 

#include <stdio.h>

 

#define N 100

 

intmain( )

   {                                                          

inti,j,number;                                             

       float finalmedian,array[N],temporary;                                   

 

printf("Please enter the number of elements \n");                 

scanf("%d", &number);                                       



printf("Please input %d  the elements\n",number);                         

       for (i = 1; i<= number ;i++)                              

scanf("%f", &array[i]);    

 

    /* Now will perform the  bubble Sorting */
for (i = 1 ; i<= number-1 ; i++)                           

       {    
for (j = 1 ; j <= number-i ; j++)                        

          {                                                   

              if (array[j] <= array[j+1])                             

              { /* Now we will perform the interchanging of the  values */

                temporary = array[j];                                     

                array[j] = array[j+1];                                

                array[j+1] = temporary;                                   

              }                                                

elsecontinue ;

          }                                                   

       }

 

/*The process of  sorting will  end here */

 

/* Now we will calculate the median  */


if ( number % 2 == 0)                                        

finalmedian = (array[number/2] + array[number/2+1])/2.0 ;

       else                                                   

finalmedian = array[number/2 + 1];                                

 

    /* Finally we will display the median */
for (i = 1 ; i<= number ; i++)                             

printf("%f  ", array[i]);                              

printf("\n\nTheMedian of the number  is %f\n", finalmedian);                  

 

return 0;

 }   

 

 

 

 

 

 

Attachments:

Answers

(4)
Status NEW Posted 04 Dec 2017 12:12 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)