atul he is assigning the value later on.
i think format specifier . rounds up the number in last decimal place.

On Tue, Jan 17, 2012 at 11:53 AM, atul anand <atul.87fri...@gmail.com>wrote:

> 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 
> <dabbcomput...@gmail.com>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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> 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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to