What are the various ways to remove a decimal from a number?
What will be an ideal response?
Decimals can be removed from a number in a few ways. First, the Math.floor
method will remove any decimal value, leaving only the whole number.
Math.ceil will round the number up to the next whole number if there is
any decimal value at all. Math.round will remove the decimal if the decimal
value is less than .5, or round the number up to the next whole number if
the decimal value is equal to or greater than .5
You might also like to view...
Microsoft developed Windows 8 for desktop, laptop, and tablet computers.
Answer the following statement true (T) or false (F)
Which of the following will not retain data after the computer is turned off?
A. RAM B. hard drive C. DVD D. ROM
In reference to personal computer hardware, explain the system unit.
What will be an ideal response?
The ____________________ method of the String class creates a new string with the first instance of a specified pattern replaced with the value of the text argument.
Fill in the blank(s) with the appropriate word(s).