SHARE
TWEET

Untitled

a guest Apr 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double tripPrice = double.Parse(Console.ReadLine());
  14.             double puzzles = double.Parse(Console.ReadLine());
  15.             double talkingPuppets = double.Parse(Console.ReadLine());
  16.             double teddyBears = double.Parse(Console.ReadLine());
  17.             double minions = double.Parse(Console.ReadLine());
  18.             double camions = double.Parse(Console.ReadLine());
  19.  
  20.             double puzzlesPrice = puzzles * 2.60;
  21.             double talkingPuppetsPrice = talkingPuppets * 3;
  22.             double teddyBearsPrice = teddyBears * 4.10;
  23.             double minionsPrice = minions * 8.20;
  24.             double camionsPrice = camions * 2;
  25.  
  26.             double toysQuantity = puzzles + talkingPuppets + teddyBears + minions + camions;
  27.             double sum = puzzlesPrice + talkingPuppetsPrice + teddyBearsPrice + minionsPrice + camionsPrice;
  28.             double overFifty = sum * 0.25;
  29.             double krainaCena = sum - overFifty;
  30.             double naem = krainaCena * 0.10;
  31.             double pechalba = krainaCena - naem;
  32.             double ostatuk = pechalba - tripPrice;
  33.  
  34.             if (toysQuantity >= 50)
  35.             {
  36.                 Console.WriteLine($"Yes! {0} lv left.", ostatuk);
  37.             }
  38.             else if(toysQuantity < 50)
  39.             {
  40.                 Console.WriteLine($"Not enough money! {0} lv needed.", ostatuk);
  41.             }
  42.         }
  43.     }
  44. }
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