printf is very week to convert int to float or vice versa..
please read D. Ritchie for details.

On 10/9/10, @shu <ashu.nit...@gmail.com> wrote:
>
>
> On Oct 9, 11:51 am, Ashutosh Tripathi <ashu.nit...@gmail.com> wrote:
>> hey! i am also unable to explain but one thing i got............
>> if we use %d in place of %f,we will get the correct output.........
>> we must use %d as x is of int data type.....so the code is itself
>> wrong.............
>> or
>> u can change x to float data type..............which means u have to
>> modify the code
>>
>> --
>> Ashutosh Tripathi
>> UG Student
>> Computer Science and Engineering Department,
>> Nit Durgapur,West Bengal.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@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.
>
>


-- 
DIPANKAR DUTTA
M-TECH,Computer Science & Engg.
E&C Dept,IIT ROORKEE
Uttarakhand , India – 247667
-------------------------------------------
website:http://people.iitr.ernet.in/shp/09535009/Website/index.html
ph no-09045809987
email:dipan...@iitr.ernet.in <email%3adipan...@iitr.ernet.in>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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