Computer Science, asked by Shourjya13, 9 months ago

C. Do as directed:
Give output of the following program segment:
double x = 2.9, y = 2.5:
System.out.printlin(Math.min(Math.floor(x) y));
System.out.println(Math.max(Math.ceil(x),y));
Give output of the following program segment:
double b=-15.6
double a=Math.rint(Math.abs(b));
System.out.println("a="+a):
3. Give the output of the following expressions.
i) If x = -9.99, calculate Math.abs(x):
ii) If x = 9.0, calculate Math.sqrt(x);
4. What are the final values stored in variables x and y below?
double a = = -6.35:
double b = 14.74;
double x = Math.abs(Math.ceil(a));
double y=Math.rint(Math.max(a,b));
What possible numbers may be stored in num?
num=3+ (int) (Math.random('12):​

Answers

Answered by gregheffley11
0

Answer:

  1. I)2.0 II)3.0
  2. 16.0
  3. I) 9.99 II) 3.0
  4. I) 6.0 II) 15.0

Explanation:

Hope it helps you. If so, please be grateful and mark it as brainliest.

Similar questions