+ 2

Please anyone explain this output?

Code: #include <iostream> using namespace std; int main() { float a=0.70; if(0.70>a){ cout<<a; } else{ cout<<0; } return 0; } Output: 0.70 But why? 0.70 is not greater than 0.70! Please anyone explain?

19th May 2019, 6:43 AM
Java/PHP/C++/JS/C/C# Challenges?
Java/PHP/C++/JS/C/C# Challenges? - avatar
4 odpowiedzi
19th May 2019, 6:53 AM
Théophile
Théophile - avatar
+ 2
Théophile thanks 🙏
19th May 2019, 7:14 AM
Java/PHP/C++/JS/C/C# Challenges?
Java/PHP/C++/JS/C/C# Challenges? - avatar
+ 1
You're welcome!
19th May 2019, 7:39 AM
Théophile
Théophile - avatar
+ 1
Float a =0.70 explain 0 and you should write double a=0.70 Check that threads https://www.sololearn.com/discuss/1801451/?ref=app
8th Nov 2020, 6:55 PM
Mehrob Abdulvahobov
Mehrob Abdulvahobov - avatar