Computer Science, asked by naazpreet13, 5 hours ago

wap in java to find the ceil value of a number stored in a variable using math class.​

Answers

Answered by purveshKolhe
3

\huge{ \green{ \boxed{ \red{ \mathfrak{answer \: : }}}}}

Solution::

import java.util.Scanner;

public class Brainly {

public static void main(String [] args) {

Scanner sc = new Scanner(System.in);

double x = sc.nextDouble();

System.out.println(Math.ceil(x));

}

}

Explaination::

  • Line 1 ==> Imports Scanner
  • Line 2 ==> Class declaration
  • Line 3 ==> main method
  • Line 4 ==> Activates the Scanner
  • Line 5 ==> Calls for the double type of input
  • Line 6 ==> Prints the ceiled value.

Sample I/O::

5.29

6

3.7

4

Hope This Helps You..

Answered by antonyvarma739
2

Explanation:

Can you guess the answer to this random fact? You’ll find a Z (Arizona), a J (New Jersey), and even two X’s (New Mexico and Texas

Similar questions