Created
November 7, 2015 20:47
-
-
Save vdonchev/b0e0f4bb279fb4696f21 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 BetterMusicProducer | |
{ | |
static void Main() | |
{ | |
int AlbumsSoldEurope = int.Parse(Console.ReadLine()); | |
decimal priceAlbumEuro = decimal.Parse(Console.ReadLine()); | |
decimal resultEURO = (AlbumsSoldEurope * priceAlbumEuro) * 1.94m; | |
int AlbumsSoldNorthAmerica = int.Parse(Console.ReadLine()); | |
decimal priceAlbumDolars = decimal.Parse(Console.ReadLine()); | |
decimal resultDolars = (AlbumsSoldNorthAmerica * priceAlbumDolars) * 1.72m; | |
int AlbumsSoldSouthAmerica = int.Parse(Console.ReadLine()); | |
decimal priceAlbumPessos = decimal.Parse(Console.ReadLine()); | |
decimal resultPessos = (AlbumsSoldSouthAmerica * priceAlbumPessos) / 332.74m; | |
int numberConcertDuringTour = int.Parse(Console.ReadLine()); | |
decimal profitOneConcert = decimal.Parse(Console.ReadLine()); | |
decimal allAlbums = resultEURO + resultDolars + resultPessos; | |
allAlbums *= .65M; | |
allAlbums *= .8M; | |
decimal concertProfit = numberConcertDuringTour * profitOneConcert * 1.94m; | |
if (concertProfit > 100000) | |
{ | |
concertProfit *= .85M; | |
} | |
if (allAlbums > concertProfit) | |
{ | |
Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", allAlbums); | |
} | |
else | |
{ | |
Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.", concertProfit); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment