Here is the source code for online exam system using PHP, MYSQL,AJAX, JAVASCRIPT etc....
Source code for Online Exam System
Source code for Online Exam System
#-Newtons divided difference interpolation formula implementation using perl language----- =comment -----Input Instruction------ Enter the number of records Now enter the value of x and corresponding y Finally enter the value of x for finding y. =cut #-------------main code start--------- print "\Enter how many record you to enter : "; $n = <>; $k = 0; print "Enter the value of x with corresponding y : \n"; for($i=0; $i<$n; $i++) { $x[$i] = <>; # Input x[] $y[$k][$i]= <>; # Input y[] } print "\n\nEnter X for finding f(x): "; $p = <>; # Mechanism for difference table----------- for($i=1;$i<$n;$i++) { $k=$i; for($j=0;$j<($n-$i);$j++) { $y[$i][$j]=($y[$i-1][$j+1]-$y[$i-1][$j])/($x[$k]-$x[$j]); $k++; } } # Print difference table----------- print "\n\n--------------------------------Difference table for Newtons Divided Formula Formula--------------------------------------\n"; print "------------------------------------------------------------------------------------------------------------------------------------------\n"; print " X\t\t"; for($i=0;$i<$n;$i++){ print "Y($i)\t\t"; } print "\n------------------------------------------------------------------------------------------------------------------------------------------\n"; for($i=0;$i<$n;$i++) { printf("\n %.4lf\t",$x[$i]); for($j=0;$j<($n-$i);$j++) { printf(" %.3lf ",$y[$j][$i]); } print "\n"; } $i=0; do { if(($x[$i]<$p) && ($p<$x[$i+1])){ $k=1; } else{ $i++; } }while($k != 1); $f=$i; $sum=0; for($i=0;$i<($n-1);$i++) { $k=$f; $temp=1; for($j=0;$j<$i;$j++) { $temp = $temp * ($p - $x[$k]); $k++; } $sum = $sum + ($temp*($y[$i][$f])); } printf("\n\nFinal answer f(%.2f) = %f\n\n",$p,$sum); print "-------------THANK YOU------------\n"; =comment --------------Input example----------- 5 0 1 1 3 3 49 4 129 7 813 .3 Ans : (0.30) = 1.831000 =cut
T
|
2
|
5
|
8
|
14
|
A
|
94.8
|
87.9
|
81.3
|
68.7
|
ɸ
|
210
|
230
|
250
|
F(ɸ)
|
0.3706
|
0.4068
|
0.4433
|
X
|
3
|
5
|
7
|
9
|
Y
|
6
|
24
|
58
|
108
|
Age(x)
|
30
|
35
|
40
|
45
|
5 0
|
Annuity
value(y)
|
15.9
|
14.9
|
14.1
|
13.3
|
12.5
|
X
|
0.46
|
0.47
|
0.48
|
0.49
|
F(x)
|
0.4846555
|
0.4937452
|
0.5027498
|
0.51166833
|
X
|
93.0
|
96.2
|
100.0
|
104.2
|
108.7
|
Y
|
11.38
|
12.80
|
14.70
|
17.07
|
19.91
|