26th Mar 2019, 11:43 AM
Sergiy L 🇺🇦
Sergiy L 🇺🇦 - avatar
4 odpowiedzi
+ 3
Try this. #include <stdio.h> int main() { float f1=0.1; if(f1==0.1f) printf ("Equal\n"); else printf ("Not equal\n"); return 0; }
26th Mar 2019, 12:54 PM
Iftakher Hossain
Iftakher Hossain - avatar
+ 1
Use 0.1f or double f1
26th Mar 2019, 11:59 AM
Anshumaan Mishra
0
Try this! #include <stdio.h> int main() { float f1 = 0.1; if (f1 == (float) 0.1) printf("Equal\n"); else printf("Not equal\n"); return 0; }
5th Apr 2019, 6:00 AM
Edison
Edison - avatar