[an error occurred while processing this directive]
|
1 преобразовать к целочисленному
float a;
int b;
a = 3.234
b = a; // b = 3
2 использовать функцию если результат цедщчисленный, а число вещественное
double floor(double x);
long double floorl(long double x);Description
Rounds down.
floor finds the largest integer not greater than x.
floorl is the long double version; it takes a long double argument and returns a long double result.
Return Value
floor returns the integer found as a double. floorl returns the integer found as a long double.
3. Отдаться компилятору
E-mail: info@telesys.ru