WRITE AN OBJECT ORIENTED PROGRAM FOR CALCULATING MEDIAN OF DISCRETE SERIES USING C++
#include #include void main() { clrscr(); float x[20],f[20],c[20],n,j=0,a=0, mid=0; cout<<"Enter the number of observations:-"; cin>>n; cout<<"\nEnter the observations:-\n"; for(int i=1;i<=n;i++) { cin>>x[i]; } cout<<"\nEnter the frequencies:-\n"; for(i=1;i<=n;i++) { cin>>f[i]; } for(i=1;i<=n;i++) { a=a+f[i]; c[i]=a; } mid=(c[n]+1)/2; cout<<"mid="<<mid<<"\n"; for(i=1;i<=n;i++) { if(mid
CREATED BY : POORVI AGRAWAL