Answers for "if a numbver is int or float how to check c++"

C++
0

check if float has decimals c++

if (some_float == (int)some_float) {
	// decimal part == 0.0 i.e. no fractional part
}
Posted by: Guest on September-14-2020

Code answers related to "if a numbver is int or float how to check c++"

Browse Popular Code Answers by Language