M
manish sahu
int main()
{
float l,c,r,frq;
float u,v;
clrscr();
printf("Enter the value of l r and c");
scanf("%f%f%f",&l,&r,&c);
u=1/(l*c);
v=(r*r)/(4*c*c);
frq=sqrt(u-v);
printf("%f",frq);
getch();
return 0;
}
at run time i m giving value of l, r ,c
5 6 4
this is showing runtime error and printing value
sqrt: DOMAIN error
33.00
plz tell me what is the problem
{
float l,c,r,frq;
float u,v;
clrscr();
printf("Enter the value of l r and c");
scanf("%f%f%f",&l,&r,&c);
u=1/(l*c);
v=(r*r)/(4*c*c);
frq=sqrt(u-v);
printf("%f",frq);
getch();
return 0;
}
at run time i m giving value of l, r ,c
5 6 4
this is showing runtime error and printing value
sqrt: DOMAIN error
33.00
plz tell me what is the problem