SHARE
TWEET

Untitled

a guest Apr 21st, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $distinacia = readline();
  4. $data = readline();
  5. $noshtuvki = intval(readline());
  6. $price = 0;
  7. switch ($distinacia) {
  8.     case"France":
  9.         switch ($data) {
  10.             case"21-23":$price = 30;
  11.                 break;
  12.             case"24-27":$price = 35;
  13.                 break;
  14.             case"28-31":$price = 40;
  15.                 break;
  16.         }
  17.         break;
  18.     case"Italy":
  19.         switch ($data) {
  20.             case"21-23":$price = 28;
  21.                 break;
  22.             case"24-27":$price = 32;
  23.                 break;
  24.             case"28-31":$price = 39;
  25.                 break;
  26.         }
  27.         break;
  28.     case"Germany":
  29.         switch ($data) {
  30.             case"21-23":$price = 32;
  31.                 break;
  32.             case"24-27":$price = 37;
  33.                 break;
  34.             case"28-31":$price = 43;
  35.                 break;
  36.         }
  37.         break;
  38. }
  39. $total = $noshtuvki * $price;
  40. printf("Easter trip to $distinacia : %.2f leva.", $total);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top