Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>Future Value</title>
- </head>
- <body>
- <?php # Script 1.8 - futureValue.php.
- // Set the variables:
- $interest = .08;
- $amount = 1000;
- $years = 20;
- // Calculate the value:
- $value = $amount* pow( (1+$interest), $years);
- // Format the total:
- $value = number_format ($value, 2);
- // Print the results:
- echo "<p>The future value is <b>/$$value</b>.</p>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement