Программа вычисляет т1, т2. помогите исправить баг в программе. язык си. птшу в вижуал студио.
Код:
#include "stdio.h"
#include "math.h"
int main(void)
{
double a=1,b=1;
double x, y;
double t1,t2;
printf("Give me x y: ");
scanf_s("%lf %lf",&x,&y);
if( )
{
t1=-a*(1/(b*b*y)+1/(a*b*b*x)-2/(b*b*b)*log(y/x));
t2=1/(2*a*tan(a*x/2))+1/(6*a*pow(tan(a*x/2),3));
}
else(x==0 && y==0)
{
printf("You are dork!!! ");
}
printf("%lg %lg ",t1,t2);
getchar();
return 0;
}
Код:
#include "stdio.h"
#include "math.h"
int main(void)
{
double a=1,b=1;
double x, y;
double t1,t2;
printf("Give me x y: ");
scanf_s("%lf %lf",&x,&y);
if( )
{
t1=-a*(1/(b*b*y)+1/(a*b*b*x)-2/(b*b*b)*log(y/x));
t2=1/(2*a*tan(a*x/2))+1/(6*a*pow(tan(a*x/2),3));
}
else(x==0 && y==0)
{
printf("You are dork!!! ");
}
printf("%lg %lg ",t1,t2);
getchar();
return 0;
}