NastySwipy

Exam - 17 December 2017 - 02. New Years Eve Party

Jan 24th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. $guestsNumber = readline();
  3. $ivanovisBudget = readline();
  4. $couvertsPrice = 20 * $guestsNumber;
  5. if ($couvertsPrice < $ivanovisBudget){
  6.     echo "Yes! ".round(($ivanovisBudget - $couvertsPrice) * 0.40)." lv are for fireworks and ".round(($ivanovisBudget - $couvertsPrice) * 0.60)." lv are for donation.";
  7. }
  8. else{
  9.     echo "They won't have enough money to pay the covert. They will need ".round($couvertsPrice - $ivanovisBudget)." lv more.";
  10. }
Advertisement
Add Comment
Please, Sign In to add comment