Created
November 5, 2015 15:24
-
-
Save martoly/092bbd7138ba9ee206f4 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())* 1.94m; | |
uint nAlbumsNA = uint.Parse(Console.ReadLine()); | |
decimal priceAlbumDollar = decimal.Parse(Console.ReadLine())* 1.72m; | |
uint nAlbumsSA = uint.Parse(Console.ReadLine()); | |
decimal priceAlbumPeso = decimal.Parse(Console.ReadLine())/ 332.74m; | |
uint nConcerts = uint.Parse(Console.ReadLine()); | |
decimal profitConcert = decimal.Parse(Console.ReadLine())* 1.94m; | |
decimal allAlbumSum = (nAlbumsEurope * priceAlbumEuro) + (nAlbumsNA * priceAlbumDollar) + (nAlbumsSA * priceAlbumPeso); | |
decimal taxProfit = allAlbumSum - ((allAlbumSum * 35) / 100); | |
decimal pureProfit = taxProfit - ((taxProfit * 20) / 100); | |
decimal 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