daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Sep 19th, 2018 67 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 dumi
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double priceExcursion = double.Parse(Console.ReadLine());
  14.             double puzzles = double.Parse(Console.ReadLine());
  15.             double dollsTalking = double.Parse(Console.ReadLine());
  16.             double teddyBear = double.Parse(Console.ReadLine());
  17.             double minions = double.Parse(Console.ReadLine());
  18.             double trucks = double.Parse(Console.ReadLine());
  19.  
  20.             double sum = puzzles * 2.60 + dollsTalking * 3 + teddyBear * 4.10 + minions * 8.20 + trucks * 2;
  21.  
  22.             double toys = puzzles + dollsTalking + teddyBear + minions + trucks;
  23.  
  24.             if( toys >= 50)
  25.             {
  26.                 sum = (1-0.25) * sum;
  27.                 {
  28.                     sum =(1- 0.10) * sum;
  29.                 }
  30.                 if (sum >= priceExcursion)
  31.                 {
  32.                     double totalsum = sum - priceExcursion;
  33.  
  34.                     Console.WriteLine($"Yes! {totalsum:F2} lv left.");
  35.                 }
  36.                 else
  37.                 {
  38.                     double needmoney = sum - priceExcursion;
  39.  
  40.                     Console.WriteLine($"Not enough money! {needmoney:F2} lv needed.");
  41.                 }
  42.             }
  43.  
  44.  
  45.         }
  46.  
  47.     }
  48. }
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