Dear friends,
Please take a look at the following code. Its storing .7 to b and comparing b with .7 . But getting just the opposite of expected result!!
Please explain!
(Three is expected o/p but we get two when run)
Code:#include<stdio.h> int main(int argc,char **argv) { float a=0.5,b=0.7; if(b<0.7) { if(a<0.5) { printf("\nONe"); } else { printf("\nTwo"); } } else { printf("\nThree"); } return 0; }




Reply With Quote
