ITS EASY...
TRY THIS OUT..
TRAPEZOIDAL METHOD
#include
#include
#include
float valcal(float x){
return (x*x*x);
}
int main(){
float a,b,h,c,I;
int n,i;
printf("THE TRAPEZOIDAL RULE:\n");
printf("---------------------");
printf("\n\n\nEnter the two limits and the no. of divisions:\n");
scanf("%f %f %d",&a, &b, &n);
h=(b-a)/n;
//printf("\nVALUE of h: %f\n", h);
c=a;
I=valcal(a)+valcal(b);
//printf("\nVALUE FOR a: %f\n", valcal(a));
//printf("\nVALUE FOR b: %f\n", valcal(b));
for(i=1;i c=c+h; //printf("\nValue of c for loop %d: is %f\n ",i,c); if(c>=b){ printf("\n\nc>b\n\n"); break; } //printf("\nVALUE FOR %f: is %f\n",c, valcal(c)); I=I+(2*valcal(c)); //printf("\nI right now is %f", I); } printf("\n\n\nThe integration of x*x*x is: %f",(h*I)/2); printf("\n\n\n"); system("pause"); } SIMPSON'S 1/3RD METHOD #include #include #include float valcal(float x){ return (1/(1+x*x)); } int main(){ float a,b,h,c,I; int n,i; printf("THE SIMPSON'S ONE-THIRD RULE:\n"); printf("------------------------------"); printf("\n\n\nEnter the two limits and the no. of divisions:\n"); scanf("%f %f %d",&a, &b, &n); h=(b-a)/n; //printf("\nVALUE of h: %f\n", h); c=a; I=valcal(a)+valcal(b); //printf("\nVALUE FOR a: %f\n", valcal(a)); //printf("\nVALUE FOR b: %f\n", valcal(b)); for(i=1;i c=c+h; //printf("\nValue of c for loop %d: is %f\n ",i,c); if(c>b){ printf("\n\nc>b\n\n"); break; } //printf("\nVALUE FOR %f: is %f\n",c, valcal(c)); if(i%2==0) I=I+(2*valcal(c)); else I=I+4*valcal(c); //printf("\nI right now is %f", I); } printf("\n\n\nThe integration of x*x*x is: %f",(h*I)/3); printf("\n\n\n"); system("pause"); } NEED MORE HELP... MAIL ME YOUR PROB... SEE YA
dfgbrgffee
y=2x2+3x+1
No, a program may not work with two main methods. If we preferred with working with many packages means then each package may consist of a main method.
explain parameter passing methods c program
JavaScript is one program that has been written in C to implement the Apriori algorithm. There are also several other known programs available on the Internet that implement it as well.
A program in c language to implement framing methods like character stuffing can be grave sizeCRC-32 and the variable c50.
No.
no but the program family is like the simpsons
simpsons
Catherine followed Peter the Great and continued to implement his program.
dfgbrgffee
1986
give me the program which can related on domain and referential integrity.
yes
The commander, USACR/SC is the focal point for developing the processes, structure, and training necessary to implement the Army Safety Program.
The commander, USACR/SC is the focal point for developing the processes, structure, and training necessary to implement the Army Safety Program.
actually it was not successful at all.