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())* 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
You can’t perform that action at this time.