Ml
Never
#include<iostream.h> #include<conio.h> #include<math.h> float variance(float tage,int n){ float var= tage/(n-1); return var; } //------------------------------------------ float stvar(float var){ return sqrt(var); } //---------------------------------------------- float med(int n,int *age){ float total=0; if(n%2==0){ total=age[n/2]+age[(n/2)-1]; } else{ int v=n/2; total=age[v+1]; return total; } return total/2; } //---------------------------------------------- void sort(int *age,int n){ int t; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(age[i]>age[j]){ t=age[i]; age[i]=age[j]; age[j]=t; } } } } //-------------------------------------- void agebar(int *age,float *ageb,float *agebs,float m,int n){ for(int i=0;i<n;i++){ ageb[i]=age[i]-m; agebs[i]=ageb[i]*ageb[i]; } } //---------------------- float tabs(float *agebs,int n){ float t=0; for(int i=0;i<n;i++) t+=agebs[i]; return t; } int main(void){ clrscr(); int n; float a; int *age=new int[n]; float *ageb=new float[n]; float *agebs=new float[n]; cout<<"Enter the Number of Ages: "; cin>>n; for(int i=0;i<n;i++){ cout<<"Enter the "<<i+1<<" age: "; cin>>age[i]; } sort(age,n); float m=med(n,age); cout<<"the median is : "<<m<<endl<<endl; agebar(age,ageb,agebs,m,n); float tagebs=tabs(agebs,n); cout<<"total: "<<tagebs<<endl; cout<<"\t"<<"age"<<"\t"<<"(age-ageb)"<<"\t"<<"s(age-age)\n\n"; for(i=0;i<n;i++){ cout<<"\t"<<age[i]<<"\t"<<ageb[i]<<"\t\t"<<agebs[i]<<endl; } float var=variance(tagebs,n); cout<<"the variance is : "<<var<<endl; float std=stvar(var); cout<<"and the st dev is "<<std<<endl; getch(); return 0; }
Raw Text
-
Johnny America Standing On Business!
6 min ago
-
Javy Coffee Reviews
7 min ago
-
Easy Outstation Cab Booking | Reliable Taxis Across India
34 min ago
-
Take my Virginity and I Let You CUM between my TITS - Innocent Step Sister Fucks For The First Time
43 min ago
-
Untitled
51 min ago
-
https://www.macombdaily.com/2024/03/27/the-growth-matrix-reviews-2024-legit-growth-matrix-or-hidden-
58 min ago
-
The Power of Valves - Engineering Excellence Unleashed
1 hour ago
-
SHENHE 申鶴的特殊治療
1 hour ago
-
https://www.macombdaily.com/2024/03/27/the-growth-matrix-reviews-2024-legit-growth-matrix-or-hidden-
1 hour ago
-
Gorgeous babe loves taking his big hard cock
1 hour ago