Академический Документы
Профессиональный Документы
Культура Документы
On
Computer Based Numerical &
Statistical Techniques
(Phase II)
April 10,2012 to March 18,2012
Program no.
Date
Program Name
10-04012
20-04012
24-04-12
27-04-12
27-04-12
01-04-12
04-04012
08-04-12
11-04-12
10
15-04-12
Group Name: G1
Group Teacher: Tarun Kathuria
Signature:
Class Teacher: Tarun Kathuria
Signature:
Remarks
OUTPUT:
How many samples are there:25
Enter the average observation each:
For Sample 1:15.91
For Sample 2:15.99
For Sample 3:15.92
For Sample 4:15.93
For Sample 5:15.98
For Sample 6:16.03
For Sample 7:15.96
For Sample 8:15.93
For Sample 9:15.96
For Sample 10:15.83
For Sample 11:15.99
For Sample 12:15.96
For Sample 13:15.83
For Sample 14:15.91
For Sample 15:16.05
For Sample 16:15.99
For Sample 17:15.86
For Sample 18:16.01
For Sample 19:15.98
For Sample 20:16.02
For Sample 21:16.00
For Sample 22:15.90
For Sample 23:15.86
For Sample 24:15.94
For Sample 25:15.94
Enter the value of z:(Standard Normal Variable):3
Enter the standard deviation:0.14
U.C.L=16.159100 C.L=15.950000 L.C.L=15.739100
OUTPUT:
How many samples are there:25
Enter the Range:
For Sample 1:0.19
For Sample 2:0.27
For Sample 3:0.17
For Sample 4:0.46
For Sample 5:0.47
For Sample 6:0.20
For Sample 7:0.46
For Sample 8:0.20
For Sample 9:0.21
For Sample 10:0.30
For Sample 11:0.29
For Sample 12:0.43
For Sample 13:0.24
For Sample 14:0.37
For Sample 15:0.31
For Sample 16:0.29
For Sample 17:0.33
For Sample 18:0.34
For Sample 19:0.28
For Sample 20:0.20
For Sample 21:0.23
For Sample 22:0.16
For Sample 23:0.32
For Sample 24:0.15
For Sample 25:0.30
Enter the value of d3:0
Enter the value of d4:2.28
U.C.L=0.598756 C.L=0.289671 L.C.L=0.000000
OUTPUT:
How many samples are there:20
Enter the number of defective tyres:
For Sample 1:3
For Sample 2:2
For Sample 3:1
For Sample 4:2
For Sample 5:1
For Sample 6:3
For Sample 7:3
For Sample 8:2
For Sample 9:1
For Sample 10:2
For Sample 11:3
For Sample 12:2
For Sample 13:2
For Sample 14:1
For Sample 15:1
For Sample 16:2
For Sample 17:4
For Sample 18:3
For Sample 19:1
For Sample 20:1
Enter the value of z:3
Enter the number of observations each for 20 samples:20
U.C.L=0.301246 C.L=0.100000 L.C.L=0.000000
OUTPUT:
Enter the number of complaints:
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
For
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
Week
1:3
2:2
3:3
4:1
5:3
6:3
7:3
8:2
9:1
10:3
11:3
12:4
13:2
14:1
15:1
16:1
17:3
18:2
19:2
20:3
}
printf("\nThe value of f(%.2f)is:%.5f",x1,r);
getch();
}
int fact(int a)
{
int fact=1;
while(a>=1)
{
fact=fact*a;
a--;
}
return fact;
}
OUTPUT:
Enter the value of n:4
X
45
50
55
60
Y
.7071
.7660
.8192
.8660
r+=y[n-1][k]*z/(pow(h,k)*fact(k));
k++;
}
printf("\nThe value of f(%.2f)is:%.2f",x1,r);
getch();
}
int fact(int a)
{
int fact=1;
while(a>=1)
{
fact=fact*a;
a--;
}
return fact;
}
OUTPUT:
Enter the value of n:5
X Y
1891
1901
1911
1921
1931
46
66
81
93
101
2.00
-1.00
-3.00
}
u=(x1-x0)/h;
printf("\nTaking the origin at %f \n",u);
index=n/2;
for(i=0;i<n;i++)
{
z=fun(u,i);
r+=y[index][i]*z/fact(i);
c++;
if(c%2==0)
index--;
}
printf("\nThe value of f(%.2f)is:%.5f",x1,r);
getch();
}
int fact(int a)
{
int fact=1;
while(a>=1)
{
fact=fact*a;
a--;
}
return fact;
}
float fun(float u,int i)
{
if(i<1)
{
return 1;
}
else if(i==1)
return u;
else if(i%2==0)
{
return((u-i/2)*fun(u,i-1));
}
else
{
return((u+i/2)*fun(u,i-1));
}
}
OUTPUT:
Enter the value of n:5
X
21
25
29
33
37
Y
18.4708
17.8144
17.1070
16.3432
15.5154
-0.00
}
u=(x1-x0)/h;
printf("\nTaking the origin at %f \n",x0);
index=n/2;
for(i=0;i<n;i++)
{
z=fun(u,i);
r+=y[index][i]*z/fact(i);
c++;
if(c%2==0)
index--;
}
printf("\nThe value of f(%.2f)is:%.5f",x1,r);
getch();
}
int fact(int a)
{
int fact=1;
while(a>=1)
{
fact=fact*a;
a--;
}
return fact;
}
float fun(float u,int i)
{
if(i<1)
{
return 1;
}
else if(i==1)
return u;
else if(i%2==0)
{
return((u+i/2)*fun(u,i-1));
}
else
{
return((u-i/2)*fun(u,i-1));
}
}
OUTPUT:
Enter the value of n:4
X
12500
12510
12520
12530
Y
111.803399
111.848111
111.892806
111.937483
**Backward
12500.00
12510.00
12520.00
12530.00
difference table**
111.80
111.85 0.04
111.89 0.04 -0.00
111.94 0.04 -0.00
0.00
OUTPUT:
Enter the number of terms:4
Enter the values of x:7
8
9
10
Enter the values of y:3
1
1
9
Enter the value of x,for which you find the value of y:9.5
Value of y is 3.625000
z=1.0;
for(j=0;j<=i;j++)
{
z=z*(x1-x[j]);
}
r=r+z*y[0][k];
k++;
}
printf("\n The value of f(%.3f) is: %.3f",x1,r);
getch();
}
OUTPUT:
Enter the value of n:6
X
Y
4 48
5 100
7 294
10 900
11 1210
13 2028
OUTPUT:
Enter the limit:
Enter the upper limit:1
Enter the lower limit:0
Enter the no. of subintervals:5
x
0.00
0.20
0.40
0.60
0.80
1.00
f(x)
0.000
0.008
0.064
0.216
0.512
1.000
Result is:0.260000
}
res=h/3*(res+eve+odd);
printf("\n\nResult is:%f",res);
getch(); }
OUTPUT:
Enter the limit:
Enter the upper limit:6
Enter the lower limit:0
Enter the no. of subintervals:6
x
0.00
1.00
2.00
3.00
4.00
5.00
6.00
f(x)
1.000
0.500
0.200
0.100
0.059
0.038
0.027
Result is:1.366174
}
res=3*h/8*(res+eve+odd);
printf("\n\nResult is:%f",res);
getch(); }
OUTPUT:
Enter the limit:
Enter the upper limit:6
Enter the lower limit:0
Enter the no. of subintervals:6
x
0.00
1.00
2.00
3.00
4.00
5.00
6.00
f(x)
1.000
0.500
0.200
0.100
0.059
0.038
0.027
Result is:1.357081