“PHP SQRT” Kode Jawaban

PHP SQRT

<?php
  
#The sqrt function finds the square root of a number

echo(sqrt(4));
# Outputs 2

echo(sqrt(-4));
#This is an impossible maths equation so, it returns NaN
?>
Rick Astley

php akar kuadrat

<?php
echo(sqrt(0) . "<br>");
echo(sqrt(1) . "<br>");
echo(sqrt(9) . "<br>");
echo(sqrt(0.64) . "<br>");
echo(sqrt(-9));
?>
Bicodev

akar kuadrat php

<?php
/*
	The sqrt() function returns square root of a positive float number. 
 	Since square root for negative number is not defined, it returns NAN. 
 	This is one of the most commonly used functions. This function always 
 	returns a floating point number. Eg:
*/
echo(sqrt(0) . "<br>"); // output: 0
echo(sqrt(1) . "<br>"); // output: 1
echo(sqrt(9) . "<br>"); // output: 3
echo(sqrt(0.64) . "<br>"); // output: 0.8
echo(sqrt(-9)); // output: NAN
// I hope this helps!
?>
CoderHomie

Jawaban yang mirip dengan “PHP SQRT”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya