You are on page 1of 16

Complete Package of

Numerical Methods and Statistical Techniques


In
Engineering & Sciences

Neeraj Anand (AMIETE-CS)


Membership No. : 193651

IETE PROJECT MIDTERM REPORT

IETE PROJECT MIDTERM REPORT

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

IETE PROJECT MIDTERM REPORT

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

IETE PROJECT MIDTERM REPORT

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

Phase -1
Arithmetic Mean

10

IETE PROJECT MIDTERM REPORT

***********************************************************************
*************************
Algorithm 1.1 : To calculate arithmetic mean of n variables

***********************************************************************
*************************
Begin
int n,y
real sum, x, mean
Write ("Enter the number of variables")
Read (n)
set sum = 0
Write ("Enter the values of variables")
for y = 1 to n by 1 do
Begin
Read (x)
set sum = sum + x
End for
mean = (sum/n)
Write ("Arithmetic Mean = ", mean);
End

***********************************************************************
*************************
Program 1.1 : Computer Program developed in Turbo - C++ to calculate
the Arithmetic Mean of Individual Series

***********************************************************************
*************************
#include<iostream.h>
void main() {
int n,y; float sum,x,mean;
cout<<"ENTER THE NUMBER OF VARIABLES n\n";
cin>> y;
cout<<"\n";

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

11

sum=0;
cout<<"ENTER THE VALUES OF NUMBER OF VARIABLES \n";
for(n=1;n<=y;++n) {
cin>> x;
sum = sum + x; }
mean=(sum/y);
cout<<"Arithmetic Mean = " << mean << "\n"; }

***********************************************************************
*************************
Algorithm 1.2 : Arithmetic Mean of Discrete Series

***********************************************************************
*************************
Begin
int n,y
real mean,sum,F,f[max],x[max]
Write ("Enter the number of variables 'n' ")
Read(y)
Write("Enter the discrete series ")
for n = 1 to y by 1 do
Begin
Read(x[n]);
End for
Write ("Enter the Frequency Values ")
for n = 1 to y by 1 do
Begin
Read(f[n])
End for
set sum=0
set F=0
for n = 1 to y by 1 do
Begin
sum=sum+(x[n]*f[n])
F = F + f[n]
End for
mean = (sum/F)
Write ("Arithmetic Mean = ",mean)
End

***********************************************************************
*************************
Program 1.2 : Computer Program developed in Turbo - C++ to
Calculate the Arithmetic Mean of the Discrete Series

***********************************************************************
*************************
#include<iostream.h>
void main() {
int n,y; float mean,sum,F,f[10],x[10];
cout<<"Enter the number of variables 'n' \n";

12

IETE PROJECT MIDTERM REPORT

cin>> y;
cout<<"Enter the values of variables \n";
for(n=0; n<y; ++n) {
cin>>x[n]; }
cout<<"ENTER THE Frequency VALUES \n";
for(n=0; n<y; ++n) {
cin>>f[n]; }
sum=0;
F=0;
for(n=0; n<y; ++n) {
sum=sum+(x[n]*f[n]);
F=F+f[n]; }
mean=(sum/F);
cout<<"Arithmetic Mean = " << mean << "\n"; }

***********************************************************************
*************************
Algorithm 1.3 : Arithmetic Mean of Continous Series

***********************************************************************
*************************
Begin
int n,y
real mean,sum,F,f[max],x[max],m[max],z[max]
Write ("Enter the number of variables")
Read (y)
Write ("Enter the continous series of variables")
for n = 1 to y by 1 do
Begin
Read (x[n],z[n])
m[n]=(x[n]+z[n])/2
End for
Write ("Enter the Frequency Values ")
for n = 1 to y by 1 do
Begin
Read (f[n])
End for
set sum=0
set F=0
for n = 1 to y by 1 do
Begin
sum=sum+(m[n]*f[n])
F=F+f[n]
End for
mean=(sum/F);
Write ("Arithmetic Mean = ",mean)
End

***********************************************************************
*************************

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

13

Program 1.3 : Computer Program developed in Turbo - C++ to calculate


the Arithmetic Mean of Continous Series

***********************************************************************
*************************
#include<iostream.h>
#define max 100
void main() {
int n,y;
float mean,sum,F,f[max],x[max],m[max],z[max];
cout<<"Enter the number of variables 'n' \n";
cin>>y;
cout<<"Enter the continous series of variables\n";
for(n=1; n<=y; ++n) {
cin>>x[n] >> z[n];
m[n]=(x[n]+z[n])/2; }
cout<<"Enter the Frequency Values \n";
for(n=1; n<=y; ++n) {
cin>>f[n]; }
sum=0;
F=0;
for(n=1; n<=y; ++n) {
sum=sum+(m[n]*f[n]);
F=F+f[n]; }
mean=(sum/F);
cout<<"Arithmetic Mean = %f\n",mean;
}

***********************************************************************
*************************
Algorithm 1.4 : Arithmetic Mean of Continous Series with cumulative
frequency values

***********************************************************************
*************************
Begin
int n,y
real mean,sum,F,f[max],x[max],m[max],z[max],f1[max]
Write ("Enter the number of variables)
Read (y)
Write ("Enter the continous series of variables)
for n = 1 to y by 1 do
begin
Read (x[n],z[n])
m[n]=(x[n]+z[n])/2
End for
Write ("Enter the Cumulative Frequency Values")
for n = 1 to y by 1 do
Begin
Read (f[n])
End for

14

IETE PROJECT MIDTERM REPORT

for n = 2 to y by 1 do
Begin
f1[n]=(f[n]-f[n-1])
End for
sum=m[1]*f[1]
F=f[1]
for n = 2 to y by 1 do
Begin
sum=sum+(m[n]*f1[n])
F=F+f1[n]
End for
mean=(sum/F)
Write ("Arithmetic Mean=",mean)
End

***********************************************************************
*************************
Program 1.4 : Computer Program developed in Turbo - C++ to calculate
the Arithmetic Mean of Continous Series with cumulative frequency
values

***********************************************************************
*************************
#include<iostream.h>
void main() {
int n,y;
float mean,sum,F,f[20],x[20],m[20],z[20],f1[20];
cout<<"Enter the number of variables \n";
cin>>y;
cout<<"Enter the continous series of variables \n";
for(n=1; n<=y; ++n) {
cin>> x[n] >> z[n];
m[n]=(x[n]+z[n])/2; }
cout<<"Enter the Cumulative Frequency Values \n";
for(n=1; n<=y; ++n) {
cin>> f[n]; }
for(n=2; n<=y; ++n) {
f1[n]=(f[n] - f[n-1]); }
sum=(m[1]*f[1]);
F=f[1];
for(n=2; n<=y; ++n) {
sum=sum+(m[n]*f1[n]);
F=F+f1[n]; }
mean=(sum/F);
cout<<"Arithmetic Mean="<< mean << "\n"; }

***********************************************************************
*************************
Algorithm 1.5 : Combined Arithmetic Mean of different series

Neeraj Anand, Membership No. 193651 (AMIETE-CS)

15

***********************************************************************
*************************
define max 100
Begin
int n,y
real x[max],m[max],commean,N
Write ("Enter the number of different series")
Read (y)
Write ("Enter the observations in different series)
Set N=0
for n = 1 to y by 1 do
Begin
Read (x[n])
N=N+x[n]
End for
printf("Enter the means of different series)
for n = 1 to y by 1 do
Begin
Read (m[n])
End for
Set commean=0
for n = 1 to y by 1 do
Begin
commean=commean + (x[n]*m[n])/N
End for
Write ("Combined Mean =",commean)
End

***********************************************************************
*************************
Program 1.5 : Computer Program developed in Turbo - C++ to calculate
Combined Arithmetic Mean of different series

***********************************************************************
*************************
#include<iostream.h>
#define max 100
void main() {
int n,y; float x[max],m[max],commean,N;
cout<<"Enter the number of different series\n";
cin>> y;
cout<<"Enter the observations in different series \n";
N=0;
for(n=1; n<=y; ++n) {
cin>> x[n];
N=N+x[n]; }
cout<<"Enter the means of different series \n";
for(n=1; n<=y; ++n) {
cin>> m[n]; }
commean=0;

16

IETE PROJECT MIDTERM REPORT

for(n=1; n<=y; ++n) {


commean=commean + (x[n]*m[n])/N; }
cout<<"Combined Mean =" <<commean << "\n"; }

You might also like