1.

What Is The Use Of Truncate Methods?

Answer»

Truncate method is used to return an integer after discarding any fractions digits.

Example:

VOID main() {

double N1 = 2.123;

VAR value = n1.truncate();

PRINT("The truncated value of 2.123 = ");

}

Truncate method is used to return an integer after discarding any fractions digits.

Example:

void main() {

double n1 = 2.123;

var value = n1.truncate();

print("The truncated value of 2.123 = ");

}



Discussion

No Comment Found