0

How can I write that if var c is a float then cout a specific code and else cout something else in c++?

I want to write a program that can give me a specific text when the variable c is a float and another text if the var c is not a float. How can I do this? Please help.

14th Dec 2020, 6:10 PM
Alex
Alex - avatar
10 Réponses
+ 1
Ok, but I want my program to type "e" if the var c is an int and type "e+1" if the var c is a float. But thank you for answering!
14th Dec 2020, 6:27 PM
Alex
Alex - avatar
+ 1
Thank you very much!!!
14th Dec 2020, 6:32 PM
Alex
Alex - avatar
+ 1
Yeah. I think so. Wait a min
14th Dec 2020, 6:34 PM
Alex
Alex - avatar
+ 1
DEEPAK since when abs() part of <algorithm>?
15th Dec 2020, 12:57 AM
Flash