Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="">
- Masukkan saldo anda <input type="text" name ="saldo"><br>
- Masukkan jumlah bulan <input type="text" name ="bulan"><br>
- <input type="submit" name="submit" value="submit">
- <input type="reset" name="reset" value="reset">
- </form>
- <?php
- $s=$_POST[saldo];
- echo"Saldo yang anda input adalah Rp ".round($s,0)."<br>";
- $b=$_POST[bulan];
- echo"Jumlah bulan yang anda input adalah ".$b." bulan<br>";
- $x=1;
- while($x<=$b)
- {
- if($s<1100000)
- {
- $s=((0.03*$s)+$s)-9000;
- }
- else
- {
- $s=((0.04*$s)+$s)-9000;
- }
- $x++;
- }
- echo"Saldo anda sekarang adalah Rp ".round($s,0);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement