Answers for "how to know if a number is float or not in cpp"

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 "how to know if a number is float or not in cpp"

Browse Popular Code Answers by Language