“Math.sqrt” Kode Jawaban

SQRT JavaScript

let number = 16
Math.sqrt(number);
//output = 4
Evil Elephant

Math.sqrt ()

console.log(Math.sqrt(4));  // 2
console.log(Math.sqrt(9));  // 3
console.log(Math.sqrt(2));  // 1.4142135623730951

console.log(Math.sqrt(0));  // 0
console.log(Math.sqrt(-0));  // -0
console.log(Math.sqrt(-1));  // NaN
Gorgeous Goldfinch

JavaScript Math.sqrtmethod

Math.sqrt(25);
Nasty Narwhal

Math.sqrt

import java.lang.*;

public class MathDemo {

   public static void main(String[] args) {

//what is Math.sqrt(4)?

      double x = 4;
      
      System.out.println("Math.sqrt(" + x + ")=" + Math.sqrt(x));
      
   }
}

//the output is 2
Xenophobic Xenomorph

Jawaban yang mirip dengan “Math.sqrt”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya