0 votes
in Swift by
Choose the correct evaluated statement

A

round(-3.500) = -3

B

ceil(-3.999) = -3

C

floor(-3.001) = -3

D

Int(-3.999) = -4

1 Answer

0 votes
by

Answer: B

Reason:  round(_:) Rounds the value to an integral value using the specified rounding rule. ceil(_:) Rounds any number with a decimal value up to the next larger whole number. floor(_:) Rounds any number with a decimal value down to the next smaller whole number. Int: Converts a Double to an Int, dropping any decimal value.

...