This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

1491 points
5307b56e548c35feba001e34_170716399
Submitted by
Dylan Pool
over 3 years ago

AHHH!!! I am soooo stuck, PLEASE HELP NOW!!!!!

Here is my code, please help I have been stuck and none of these cruddy answers work:

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


<?php
// Try rounding a floating point number to 3 decimal places
// and print it to the screen
$round = round(M_PI,3);
print $round;
?>
    </p>
</html>

Thanks very much!


6 votes

permalink

<html>
<p>
<?php
// Try rounding a floating point number to an integer
// and print it to the screen
$test = round(3.4);
echo $test;
?>
</p>
<p>
<?php
// Try rounding a floating point number to 3 decimal places
// and print it to the screen
$test = round(3.4312,3);
echo $test;
?>
</p>

This is my code, tho.

421 points
Picture
Submitted by
Singh
over 3 years ago

1 Comment

5307b56e548c35feba001e34_170716399 Dylan Pool over 3 years ago

Thanks man, really appreciate it.