मराठी

What will be the output of the given Java code after the calculation [note the data types]? double cy = Math.ceil (Math.cbrt(0.125), Math.sqrt(0.64)); System.out.println("CY=" +cy);

Advertisements
Advertisements

प्रश्न

What will be the output of the given Java code after the calculation [note the data types]?

double cy = Math.ceil (Math.cbrt(0.125), Math.sqrt(0.64));

System.out.println("CY=" +cy);

लघु उत्तर
Advertisements

उत्तर

intended to use Math.max() or Math.min() (which do accept two arguments), here is how they would evaluate:

Inner Functions:

  • Math.cbrt(0.125) (cube root of 0.125) = 0.5
  • Math.sqrt(0.64) (square root of 0.64) = 0.8

Hypothetical Output:

  • If it were Math.max(0.5, 0.8), the output would be: CY = 0.8.
  • If it were Math.min(0.5, 0.8), the output would be: CY = 0.5.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1: Revision of Class 9 Syllabus - Exercises [पृष्ठ ४६]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 1 Revision of Class 9 Syllabus
Exercises | Q 5. (ix) | पृष्ठ ४६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×