SHARE
TWEET

Football Souvenirs

giaradeva Apr 20th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $team = readline();
  4. $souvenirs_type = readline();
  5. $souvenirs_count = intval(readline());
  6. if ($team === 'Argentina' && $souvenirs_type === 'flags'){
  7.     $souvenir_price = 3.25;
  8.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  9.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  10. }else if ($team === 'Argentina' && $souvenirs_type === 'caps'){
  11.     $souvenir_price = 7.2;
  12.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  13.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  14. }else if ($team === 'Argentina' && $souvenirs_type === 'posters'){
  15.     $souvenir_price = 5.1;
  16.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  17.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  18. }else if ($team === 'Argentina' && $souvenirs_type === 'stickers'){
  19.     $souvenir_price = 1.25;
  20.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  21.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  22. }else if ($team === 'Brazil' && $souvenirs_type === 'flags'){
  23.     $souvenir_price = 4.2;
  24.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  25.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  26. }else if ($team === 'Brazil' && $souvenirs_type === 'caps'){
  27.     $souvenir_price = 8.5;
  28.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  29.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  30. }else if ($team === 'Brazil' && $souvenirs_type === 'posters'){
  31.     $souvenir_price = 5.35;
  32.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  33.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  34. }else if ($team === 'Brazil' && $souvenirs_type === 'stickers'){
  35.     $souvenir_price = 1.2;
  36.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  37.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  38. }else if ($team === 'Croatia' && $souvenirs_type === 'flags'){
  39.     $souvenir_price = 2.75;
  40.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  41.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  42. }else if ($team === 'Croatia' && $souvenirs_type === 'caps'){
  43.     $souvenir_price = 6.9;
  44.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  45.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  46. }else if ($team === 'Croatia' && $souvenirs_type === 'posters'){
  47.     $souvenir_price = 4.95;
  48.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  49.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  50. }else if ($team === 'Croatia' && $souvenirs_type === 'stickers'){
  51.     $souvenir_price = 1.1;
  52.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  53.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  54. }else if ($team === 'Denmark' && $souvenirs_type === 'flags'){
  55.     $souvenir_price = 3.1;
  56.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  57.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  58. }else if ($team === 'Denmark' && $souvenirs_type === 'caps'){
  59.     $souvenir_price = 6.5;
  60.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  61.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  62. }else if ($team === 'Denmark' && $souvenirs_type === 'posters'){
  63.     $souvenir_price = 4.8;
  64.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  65.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  66. }else if ($team === 'Denmark' && $souvenirs_type === 'stickers'){
  67.     $souvenir_price = 0.9;
  68.     $total_souvenirs_price = $souvenir_price * $souvenirs_count;
  69.     echo "Pepi bought $souvenirs_count $souvenirs_type of $team for " . number_format($total_souvenirs_price, 2, '.', '') . " lv.";
  70. }else if ($team !== 'Argentina' && $team !== 'Brazil' && $team !== 'Croatia' && $team !== 'Denmark'){
  71.     echo "Invalid country!";
  72. }else{ $souvenirs_type !== 'flags' && $souvenirs_type !== 'caps' && $souvenirs_type !== 'posters' && $souvenirs_type !== 'stickers';
  73.     echo "Invalid stock!";
  74. }
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