Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.