What is the problem? I have been trying for so long...

``````<html>
<p>
<?php
``````

\$round = round(M_PI);
print \$round;
?>

<?php
\$rounddecimal = round(MPI, 3);
print \$round_decimal;
?>

\$rounddecimal = round(MPI, 3);

Should be M_PI not MPI, hope this helps

Ajinkya Rane about 5 years ago

it still says
Oops, try again! Your first call to round() should print an integer.

You wrote ( \$rounddecimal but u printed \$round_decimal Fix that ) Hope it help

<?php
// Try rounding a floating point number to an integer
// and print it to the screen
\$round = round(MPI);
echo \$round
?>

<?php
// Try rounding a floating point number to 3 decimal places
// and print it to the screen
\$test = round(M
PI, 3);
echo \$test
?>

Ajinkya Rane about 5 years ago

Thank You
!

Welcome anyTime

it doesn't work.

What did you write , please copy and paste it exactly yo make sure of the code

i just think its the browser....

ya maybe :)

brennanpringle_4f151ba89c99ab0001018 almost 5 years ago

You're missing the underscore in the constant "M_PI."

Ajinkya Rane almost 5 years ago

Thanks for all the great help!

roun512 almost 5 years ago

@Brennan Pringle , about the underscore It's auto deleted in here because i didn't put my code in [code] tag :)

roun512 almost 5 years ago

@Ajinkya Rane , You are welcome , Glad that it helped you

roun512 almost 5 years ago

here is the right code

<?php
// Try rounding a floating point number to an integer
// and print it to the screen
\$round = round(MPI);
echo \$round
?>

<?php
// Try rounding a floating point number to 3 decimal places
// and print it to the screen
\$test = round(M
PI, 3);
echo \$test
?>