Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Globalization;
- namespace TheBetterProducer
- {
- class TheBetterProducer
- {
- static void Main()
- {
- //Culture
- Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
- //Const
- const decimal euro = 1.94M;
- const decimal dollar = 1.72M;
- const decimal pesos = 332.74M;
- //input data
- uint numberAlbumsEU = uint.Parse(Console.ReadLine());
- decimal priceEU = decimal.Parse(Console.ReadLine());
- uint numberAlbumsNA = uint.Parse(Console.ReadLine());
- decimal priceDoll = decimal.Parse(Console.ReadLine());
- uint numberAlbumsSA = uint.Parse(Console.ReadLine());
- decimal pricePesos = decimal.Parse(Console.ReadLine());
- uint numberConcerts = uint.Parse(Console.ReadLine());
- decimal profitForSingleCon = decimal.Parse(Console.ReadLine());
- //Calculation
- decimal priceEULv = (numberAlbumsEU * priceEU) * euro;
- decimal priceNALv = (numberAlbumsNA * priceDoll) * dollar;
- decimal priceSALv = (numberAlbumsSA * pricePesos) / pesos;
- decimal albumProfit = priceEULv + priceNALv + priceSALv;
- decimal producerShare = albumProfit * 0.35M;
- decimal profitAfterPrSh = albumProfit - producerShare;
- decimal taxes = profitAfterPrSh * 0.20M;
- decimal profitAfterCharges = albumProfit - (producerShare + taxes);
- decimal concertsProfit = (numberConcerts * profitForSingleCon) * euro;
- //Conditions
- if (profitAfterCharges > concertsProfit)
- {
- Console.WriteLine($"Let's record some songs! They'll bring us {profitAfterCharges:F2}lv.");
- }
- else
- {
- if (concertsProfit >= 100000)
- {
- decimal charges = concertsProfit * 0.15M;
- concertsProfit -= charges;
- Console.WriteLine($"On the road again! We'll see the world and earn {concertsProfit:F2}lv.");
- }
- else
- {
- Console.WriteLine($"On the road again! We'll see the world and earn {concertsProfit:F2}lv.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement