Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp4
- {
- class Program
- {
- static void Main(string[] args)
- {
- double tripPrice = double.Parse(Console.ReadLine());
- double puzzles = double.Parse(Console.ReadLine());
- double talkingPuppets = double.Parse(Console.ReadLine());
- double teddyBears = double.Parse(Console.ReadLine());
- double minions = double.Parse(Console.ReadLine());
- double camions = double.Parse(Console.ReadLine());
- double puzzlesPrice = puzzles * 2.60;
- double talkingPuppetsPrice = talkingPuppets * 3;
- double teddyBearsPrice = teddyBears * 4.10;
- double minionsPrice = minions * 8.20;
- double camionsPrice = camions * 2;
- double toysQuantity = puzzles + talkingPuppets + teddyBears + minions + camions;
- double sum = puzzlesPrice + talkingPuppetsPrice + teddyBearsPrice + minionsPrice + camionsPrice;
- double overFifty = sum * 0.25;
- double krainaCena = sum - overFifty;
- double naem = krainaCena * 0.10;
- double pechalba = krainaCena - naem;
- double ostatuk = pechalba - tripPrice;
- if (toysQuantity >= 50)
- {
- Console.WriteLine($"Yes! {0} lv left.", ostatuk);
- }
- else if(toysQuantity < 50)
- {
- Console.WriteLine($"Not enough money! {0} lv needed.", ostatuk);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement