Math, asked by kamreetsidhu20july, 1 month ago

how to convert decimal into integer ​

Answers

Answered by XxItzhearthakkerxX
41

Answer:

  • All the digits after the decimal are lost and x holds the integer 3; this can be done using typecasting in Java.
  • The value is rounded off to the nearest integer (i.e.,3.6987 is rounded off to 4); this can be done using the Math. round() function in Java.

hope it helps u

Answered by mansi0807
1

Answer:

There are two ways that this can be done:

All the digits after the decimal are lost and x holds the integer 3; this can be done using typecasting in Java.

The value is rounded off to the nearest integer (i.e.,3.6987 is rounded off to 4); this can be done using the Math. round() function in Java.

Step-by-step explanation:

Mark me as a Brainliest if it helps

Similar questions