From e1cb90a2534563e763c0800b2eaa2caec7720cef Mon Sep 17 00:00:00 2001 From: JRaiden Date: Mon, 1 Oct 2018 18:31:05 -0500 Subject: [PATCH 1/3] Update Simpson's_1-3rd_rule.c --- .../Simpson's_1-3rd_rule.c | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c b/Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c index 3483b25c..de715d0a 100644 --- a/Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c +++ b/Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c @@ -1,34 +1,40 @@ -#include #include #include -float f(float x) + +float f(float x) { - return 1.0+x*x*x; + return 1.0+x*x*x; //This is the expresion of the function to integrate? } void main() { int i,n; float a,b,h,x,s2,s3,sum,integral; - printf("enter the lower limit of the integration"); - sacnf("%f",&a); - printf("enter the upper limit of the integration"); - sacnf("%f",&b); - printf("enter the number of intervals"); - sacnf("%d",&n); + + printf("enter the lower limit of the integration:"); + scanf("%f",&a); + printf("enter the upper limit of the integration:"); + scanf("%f",&b); + printf("enter the number of intervals:"); + scanf("%d",&n); + h=(b-a)/n; sum=f(a)+f(b); s2=s3=0.0; + for(i=1;i Date: Mon, 11 Feb 2019 05:55:44 +0530 Subject: [PATCH 2/3] Rename Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c to computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c --- .../Simpson's_1-3rd_rule.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {Computer Oriented Statistical Methods => computer_oriented_statistical_methods}/Simpson's_1-3rd_rule.c (100%) diff --git a/Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c b/computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c similarity index 100% rename from Computer Oriented Statistical Methods/Simpson's_1-3rd_rule.c rename to computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c From b09809273554b5f1554163ebf80a15c03334820a Mon Sep 17 00:00:00 2001 From: Ashwek Swamy <39827514+ashwek@users.noreply.github.com> Date: Mon, 11 Feb 2019 05:56:44 +0530 Subject: [PATCH 3/3] Rename Simpson's_1-3rd_rule.c to simpson's 1-3rd rule.c --- .../{Simpson's_1-3rd_rule.c => simpson's 1-3rd rule.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename computer_oriented_statistical_methods/{Simpson's_1-3rd_rule.c => simpson's 1-3rd rule.c} (100%) diff --git a/computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c b/computer_oriented_statistical_methods/simpson's 1-3rd rule.c similarity index 100% rename from computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c rename to computer_oriented_statistical_methods/simpson's 1-3rd rule.c