i have a program that read a float number, but with in the program i need 2 deal with the integer only
ex. 33.78 i need 2 deal with 33
45,01 ----> 45
66.99----->66 and so on
simple -- just typecast the float to an int. All decimals will be dropped, nothing rounded with this method.
float f = 12.345; int i = (int)f;
If it's c++ then use
that's all what i need.
We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.