Hello friends ....
here is a simple PHP code to choose a random number and display its square root.
can you find any error in this program.....
reply......
regards : m2soft solutions Pvt. Ltd.
here is a simple PHP code to choose a random number and display its square root.
<html>
<head><title>Random</title></head>
<body>
<p>I have randomly selected the number <?php
choice = rand(1, 100);
echo $choice;
?>. Its square root is <?php
echo sqr($choice);
?>.<p>
</body>
</html>
can you find any error in this program.....
reply......
regards : m2soft solutions Pvt. Ltd.
there is no $ sign in declaring a variable
ReplyDeletethere are more mistakes in the program,.....
ReplyDeletesqrt($choice); you are calling sqr which is not function
Deleteyes that's right but there is one more mistake.... find out....
Deleteline 5 $choice not choice
Deleteline 7 sqrt not sqr
https://www.youtube.com/channel/UCVd5QKIss6Kka504YFt06gQ
thanks for reply.... thats right....
Delete