I have tried values 0.1,0.2,0.3,0.35,0.3000025. None seem to print the word "If", they print "Else".Code:#include<stdio.h> #include<conio.h> void main() { float x=0.1; if(x==0.1) printf("If"); else printf("Else"); getch(); }
Could somebody help me with the reason for the same.