Already a member?
Sign in
| Version | User | Scope of changes |
|---|---|---|
| Aug 1 2008, 7:57 PM EDT (current) | Anonymous | 17 words added, 5 words deleted |
| Aug 1 2008, 7:50 PM EDT | Anonymous | 1 widget added, 1 widget deleted |
Changes
Key: Additions Deletions

<iframe src="http://www.rcbasc.com/php/tools/rule_of_72.php" name="iframe1"src=http://www.rcbasc.com/ frameborder="1"></iframe> <----- scrolling=yeswidget align=middle></iframe>code
link to rule of 72 calculator
code for rule of 72 calculator
<html>
<head>
<title>Rule of 72 Calculator Tool </title>
</head>
<body bgcolor=BBFF99>
<div>
<?php
if ( ! isset( $_POST['interest'] ) ) {
$int = null;
$int2 = null;
$yrs = null;
$yrs2 = null;
}
else {
$int = (double) $_POST['interest'];
$yrs = (int) $_POST['years'];
$int2 = (double) $_POST['interest2'];
$yrs2 = (int) $_POST['years2'];
if ( $int <= 0 ) {
$yrs = null;
}
else {
$yrs = ( 72 / $int);
}
if ( $yrs2 <= 0 ) {
$int2 = null;
}
else {
$int2 = ( 72 / $yrs2);
}
$yrs = SPRINTF("%.2f", $yrs);
$int2 = SPRINTF("%.2f", $int2);
}
?>
<center><h6>Close this window to exit RULE OF 72 CALCULATOR</h6></center>
<br>
<h3>
<center>
<pre>
How long will it take to double your money on an investment ?
72 divided by the interest rate.
What interest rate is required to double your money in a specific number of years ?
72 divided by the specified number of years.
<A HREF="rule_of_72_help.html" target="_blank">Help, Explanations & More Help !</A><br>
</pre>
</center>
</h3>
<form method="post" action="<?php print $_SERVER['PHP_SELF']?>">
<center>
<div id="aform">
<table cellpadding="0" cellspacing="0" border="0">
<th>Action</th>
<th>Entered Data</th>
<th> </th>
<th>Result</th>
<th>Calculated Data</th>
<tr>
<td>72 divided by interest rate</td>
<td> <INPUT NAME="interest" SIZE="12" TYPE="text" value="<?php print $int?>" ></td>
<td> = Number of Years to double your money</td>
<td> <INPUT NAME="years" SIZE="12" TYPE="text" value="<?php print $yrs?>" ></td>
</tr>
<tr>
<td>72 divided by Number of years to double your money  </td>
<td> <INPUT NAME="years2" SIZE="12" TYPE="text" value="<?php print $yrs2?>" ></td>
<td> = Interest rate required to double your money  </td>
<td> <INPUT NAME="interest2" SIZE="12" TYPE="text" value="<?php print $int2?>" ></td>
</tr>
</table>
</div>
</center>
<BR>
<P><CENTER><INPUT TYPE="submit" VALUE="Calculate"></input></CENTER>
</form>
<center><a href="mailto:rick@rcbasc.com">Questions or Comments or Suggestions ? Contact by email</a></center>
</div>
<center><h6>Close this window to exit RULE OF 72 CALCULATOR</h6></center>
<br>
</body>
</html>
