Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@martoly
Created November 5, 2015 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martoly/092bbd7138ba9ee206f4 to your computer and use it in GitHub Desktop.
Save martoly/092bbd7138ba9ee206f4 to your computer and use it in GitHub Desktop.
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