“Php sqrt” Réponses codées

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

Root carré php

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

racine carrée 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

Réponses similaires à “Php sqrt”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code