Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <title>Future Value</title>
  6. </head>
  7. <body>
  8. <?php # Script 1.8 - futureValue.php.
  9. // Set the variables:
  10. $interest = .08;
  11. $amount = 1000;
  12. $years = 20;
  13.  
  14. // Calculate the value:
  15. $value = $amount* pow( (1+$interest), $years);
  16.  
  17. // Format the total:
  18. $value = number_format ($value, 2);
  19.  
  20. // Print the results:
  21. echo "<p>The future value is <b>/$$value</b>.</p>";
  22. ?>
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement