mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
Merge pull request #98 from viditkulshreshtha/patch-1
Update Simpson's_1-3rd_rule.c
This commit is contained in:
commit
34e9ba11d3
@ -28,7 +28,7 @@ void main()
|
|||||||
x=a+i*h;
|
x=a+i*h;
|
||||||
s2=s2+f(x);
|
s2=s2+f(x);
|
||||||
}
|
}
|
||||||
intgral=(h/3.0)*(sum+2*s2+4*s3);
|
intgeral=(h/3.0)*(sum+2*s2+4*s3);
|
||||||
printf("\nvalue of the integral =%9.4f\n",integral);
|
printf("\nvalue of the integral =%9.4f\n",integral);
|
||||||
getch();
|
getch();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user