Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define K 22.5
- #define L 7.5
- int main(){
- double a,b,x,y;
- printf("Please type your x value:");
- scanf("%f",&x);
- a=pow(pow(K,-1/2)-(L*pow(x+2.84,1/2)),2);
- b=(-log10(x)+exp(x));
- if(a>b){
- y=(4*a+3*b)/(pow(a,2)+pow(b,2));
- printf("Your x:%f\nYour y:%f",x,y);
- getch();
- }else if(a<=b){
- y=fabs(a-b);
- printf("Your x:%f\nYour y:%f",x,y);
- getch();
- }else{
- printf("Error");
- getch();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement