Median Dis

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Median Dis as PDF for free.

More details

  • Words: 66
  • Pages: 1
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
Median Dis
June 2020 14
Median
June 2020 16
Dis
July 2020 25
Median Con
June 2020 17
J Median
May 2020 12
Tar Dis
October 2019 37