That's going to depend on the values of 'a', 'b', 'c', and 'f'.
Chat with our AI personalities
{ int a,b; { a=a^2; } { b=b^2; } { c=a^2+b^2+2*a*b; print f("%d%d%d",&c); get ch(); } ]
#include<stdio.h> #include<conio.h> int main(void) { float a,b,c=0, d=0, e=0,f=0; printf("Please enter two numbers:\n"); scanf("%f %f", &a, &b); c=a+b; d=a-b; e=a*b; f=a/b; printf("The sum of %f and %f is :%f\n", a,b,c); printf("The subtraction of %f and %f is :%f\n", a,b,d); printf("The multiplication of %f and %f is :%f\n", a,b,e); printf("The division of %f by %f is :%f\n",a,b,f); getch(); }
ITS EASY...TRY THIS OUT..TRAPEZOIDAL METHOD#include#include#includefloat 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=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#includefloat 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;ib){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));elseI=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
Unconditional statements are statements that are invoked unconditionally. Conditional statements have a controlling expression, while unconditional statements do not. For example: void f (bool b) { if (b==true) do_something(); // conditional statement (controlled by the expression b==true) do_something_else(); // unconditional (executes regardless of b's value) }
FILE* fopen(<filename>, <mode>); E.g., FILE* f = fopen("C:\\Users\\<user_name>\\My Documents\\data_file.dat", "rb"); Opens the specified file for reading ("r") in binary mode ("b").