Write a program that read an array & display medium.

#include<stdio.h>
#include<conio.h>

void main()
{
    int n,i,j,a[100],temp;
    clrscr();
    printf("How many numbers, you input in array : ");
    scanf("%d",&n);

    for(i=0;i<n;i++)
    {
       printf("\na[%d] = ",i+1);
       scanf("%d",&a[i]);
    }
   
    for(j=n-1;j>0;j--)
       for(i=0;i<j;i++)\
          if(a[i]<a[i+1])
          {
             temp=a[i];
         a[i]=a[i+1];
         a[i+1]=temp;
          }
    if(n%2==1)
       printf("Medium number in the array = %d",a[n/2]);
    else
       printf("Medium number in the array = %d & %d",a[n/2-1],a[n/2]);

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........