java math ceil
Math.ceil(125.9)=126.0
Math.ceil(0.4873)=1.0
Math.ceil(-0.65)=-0.0java math ceil
Math.ceil(125.9)=126.0
Math.ceil(0.4873)=1.0
Math.ceil(-0.65)=-0.0java math.ceil
The ceiling of a floating point number is the smallest integer that is >= to the number.java math.ceil example
import java.lang.*;
public class Math {
   public static void main(String[] args) {
      // get two double numbers
      double x = 125.9;
      double y = 0.4873;
   
      // call ceal for these these numbers
      System.out.println("Math.ceil(" + x + ")=" + Math.ceil(x));
      System.out.println("Math.ceil(" + y + ")=" + Math.ceil(y));
      System.out.println("Math.ceil(-0.65)=" + Math.ceil(-0.65));
   }
}Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us
