#include
#include
int main()
{
float x,y,f,d;
int k=0;
printf("Input x-> ");
scanf("%f", &x);
printf("Input y-> ");
scanf("%f", &y);
printf("Select f: 1 - arcsin(x/y), 2 - e^y, 3 - ln(x*y) ->");
scanf("%d", &k);
if (k<1 || k>3)
printf("Function is not selected\n");
else {
switch(k)
{
case 1: f=asin(y/x); break;
case 2: f=exp(y); break;
case 3: f=log(x*y); break;
}
if (x>y) d=pow(f-y,1.0/3)+tan(f);
else if (x else d=pow(y+f,2)+x*x*x;
printf("d = %f",d);
}
}
Пример:
Input x-> 0.8
Input y-> 1ю4
Select f: 1 - arcsin(x/y), 2 - e^y, 3 - ln(x*y) -> 2
d = -19.330284