Created
November 5, 2015 15:09
-
-
Save martoly/aa4d715b7c91d503b81a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class TheBetterMusicProducer | |
{ | |
static void Main() | |
{ | |
uint nAlbumsEurope = uint.Parse(Console.ReadLine()); | |
decimal priceAlbumEuro = decimal.Parse(Console.ReadLine()); | |
uint nAlbumsNA = uint.Parse(Console.ReadLine()); | |
decimal priceAlbumDollar = decimal.Parse(Console.ReadLine()); | |
uint nAlbumsSA = uint.Parse(Console.ReadLine()); | |
decimal priceAlbumPeso = decimal.Parse(Console.ReadLine()); | |
uint nConcerts = uint.Parse(Console.ReadLine()); | |
decimal profitConcert = decimal.Parse(Console.ReadLine()); | |
priceAlbumEuro *= 1.94m; | |
priceAlbumDollar *= 1.72m; | |
priceAlbumPeso /= 332.74m; | |
profitConcert *= 1.94m; | |
decimal taxProfit; | |
decimal pureProfit; | |
decimal concertSum; | |
decimal allAlbumSum = (nAlbumsEurope * priceAlbumEuro) + (nAlbumsNA * priceAlbumDollar) + (nAlbumsSA * priceAlbumPeso); | |
taxProfit = allAlbumSum - ((allAlbumSum * 35) / 100); | |
pureProfit = taxProfit - ((taxProfit * 20) / 100); | |
concertSum = nConcerts * profitConcert; | |
if (concertSum > 10000) | |
{ | |
concertSum = concertSum - ((concertSum * 15) / 100); | |
} | |
if (concertSum > pureProfit) | |
{ | |
Console.WriteLine("On the road again! We'll see the world and earn {0:#####.##}lv", concertSum); | |
} | |
else | |
Console.WriteLine("Let's record some songs! They'll bring us {0:#####.##}lv", pureProfit); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment