Guest User

Untitled

a guest
Nov 23rd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2.  
  3. $days = 200 * 12;
  4. $investment = 1;
  5. $percent = 0.55 ;
  6.  
  7.  
  8. for( $i=0;$i< $days; $i++ ){
  9. // echo ' On day '.($i+1).' investment is: '. $investment.' and end of the day: '. ($investment + ( $percent * ($investment/100) ));
  10. $investment = ($investment + ( $percent * ($investment/100)));
  11. // echo '<br>';
  12.  
  13. }
  14. echo ' On day '.($i+1).' investment is: '. $investment.' and end of the day: '. round($investment + ( $percent * ($investment/100) ));
  15.  
  16.  
  17. ?>
Add Comment
Please, Sign In to add comment