Advertisement
remote87

The Better Music Producer

Oct 18th, 2015
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.88 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using System.Globalization;
  4.  
  5. namespace Problem1
  6. {
  7.     class Problem1
  8.     {
  9.         static void Main()
  10.         {
  11.  
  12.             Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
  13.             int albumsEurope = int.Parse(Console.ReadLine());
  14.             decimal priceEuropeEuro = decimal.Parse(Console.ReadLine());
  15.             int albumsNorthAmerica = int.Parse(Console.ReadLine());
  16.             decimal priceNorthAmericaDoll = decimal.Parse(Console.ReadLine());
  17.             int albumsSouthAmerica = int.Parse(Console.ReadLine());
  18.             decimal priceSouthAmericaPesos = decimal.Parse(Console.ReadLine());
  19.             int concerts = int.Parse(Console.ReadLine());
  20.             decimal concertsEuro = decimal.Parse(Console.ReadLine());
  21.            
  22.             decimal euro = 1.94m;
  23.             decimal dollars = 1.72m;
  24.             decimal pesos = 332.74m;
  25.  
  26.             decimal percentageProdOne = 0.35m;
  27.             decimal taxes = 0.2m;
  28.             decimal percentegeProdTwo = 0.15m;
  29.  
  30.             decimal europe = albumsEurope * priceEuropeEuro * euro;
  31.             decimal northAmerica = albumsNorthAmerica * priceNorthAmericaDoll * dollars;
  32.             decimal southAmerica = albumsSouthAmerica * priceSouthAmericaPesos / pesos;
  33.  
  34.             //Console.WriteLine("{0}, {1}, {2}.", europe, northAmerica, southAmerica);
  35.            
  36.             decimal allAlbumsProffit = europe + northAmerica + southAmerica;
  37.             //Console.WriteLine(allAlbumsProffit);
  38.  
  39.             decimal bandProffitNoProd = allAlbumsProffit - (allAlbumsProffit * percentageProdOne);
  40.             //Console.WriteLine(bandProffitNoProd);
  41.  
  42.             decimal bandProffitAlbums = bandProffitNoProd - (bandProffitNoProd * taxes);
  43.             //Console.WriteLine(bandProffitAlbums);
  44.  
  45.             //albums Clear
  46.  
  47.             decimal proffitConcertLeva = concerts * concertsEuro * euro;
  48.             //Console.WriteLine(proffitConcertLeva);
  49.            
  50.  
  51.             decimal proffitProdTwo = 0m;
  52.             decimal proffitConcertLast = 0m;
  53.  
  54.             if (proffitConcertLeva >= 100000)
  55.             {
  56.                 proffitProdTwo = proffitConcertLeva * percentegeProdTwo;
  57.                 //Console.WriteLine(proffitProdTwo);
  58.                 proffitConcertLast = proffitConcertLeva - proffitProdTwo;
  59.                 //Console.WriteLine(proffitConcertLast);
  60.             }
  61.             else
  62.             {
  63.                 proffitConcertLast = proffitConcertLeva;
  64.             }
  65.             if (proffitConcertLeva >= bandProffitAlbums)
  66.             {
  67.                 Console.WriteLine("On the road again! We'll see the world and earn {0:0.00}lv.", proffitConcertLast);
  68.             }
  69.             else
  70.             {
  71.                 Console.WriteLine("Let's record some songs! They'll bring us {0:0.00}lv.", bandProffitAlbums);
  72.             }
  73.  
  74.         }
  75.     }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement