+ 1

C++ Output question

#include <iostream> using namespace std; int main() { float x = 0.1; if (x == 0.1) cout<<"IF"; else if (x == 0.1f) cout<<"ELSE IF"; else cout<<"ELSE"; system("pause"); return 0; } In this question why answer is ELSE IF? Who can explain?

5th Jan 2019, 6:43 PM
Jasur Makhsudov
1 Answer