EmbLogic's Blog

issue in float division

#include<stdio.h>

main(){ float f;   f=(float)100/3;   printf(“%f”,f); return 0;  }

output is    :   33.333332                     why there is 2 instead of 3 in last??????????????????

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>