printf("%0.3lf %0.3lf\n",p,t);
its just printing at your convenience . you are not changing the value of
p,t .
change this statement to
printf("%0.5lf %0.5lf\n",p,t);
On Tue, Jan 17, 2012 at 11:27 AM, dabbcomputers <[email protected]>wrote:
> #include<stdio.h>
> int main()
> {
> double p=fabs(24.9996);
> double t=fabs(25.0003);
> printf("%0.3lf %0.3lf\n",p,t);
> if(fabs(p)==fabs(t))
> printf("equal");// why this not executed?
> }
>
>
> why the "equal" not printed in this code...?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.