Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $points = intval(readline());
- $Bonus = 0;
- if ($points <= 100) {
- $Bonus = 5;
- } else if ($points > 100 && $points <= 1000) {
- $Bonus = $points * 0.2;
- } else {
- $Bonus = $points * 0.1;
- }
- if ($points % 2 == 0) {
- $Bonus += 1;
- } else if ($Bonus % 10 === 5) {
- $Bonus += 2;
- }
- echo $Bonus . PHP_EOL;
- Echo $Bonus + $points;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement