Advertisement
braveheart1989

The Better Music Producer

Feb 7th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _01.BetterMusic
  8. {
  9.     class BetterMusic
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //1.    The number of albums sold in Europe
  14.             uint numberOfEuropeAlbums = uint.Parse(Console.ReadLine());
  15.  
  16.             //2.    The price of an album in euro
  17.             decimal priceOfAlbumEuro = decimal.Parse(Console.ReadLine());
  18.  
  19.             //3.    The number of albums sold in North America
  20.             uint albumsNorthAmerica = uint.Parse(Console.ReadLine());
  21.  
  22.             //4.    The price of an album in dollars
  23.             decimal priceAlbumDollars = decimal.Parse(Console.ReadLine());
  24.  
  25.             //5.The number of albums sold in South America
  26.             uint albumsSouthAmerica = uint.Parse(Console.ReadLine());
  27.  
  28.             //6.    Price of an album in pesos
  29.             decimal priceInPesos = decimal.Parse(Console.ReadLine());
  30.  
  31.             // 7.The number of concerts during a tour
  32.             uint numberConcerts = uint.Parse(Console.ReadLine());
  33.  
  34.             //8.    Profit from a single concert in euro
  35.             decimal profitSingleEuro = decimal.Parse(Console.ReadLine());
  36.  
  37.             decimal numberOfEuropeAlbumsProfit = numberOfEuropeAlbums * priceOfAlbumEuro*1.94M;
  38.  
  39.             decimal northAmerica = albumsNorthAmerica * priceAlbumDollars*1.72M;
  40.  
  41.             decimal southAmerica = albumsSouthAmerica * priceInPesos/332.74M;
  42.  
  43.             decimal allAlbums = (numberOfEuropeAlbumsProfit + northAmerica + southAmerica);
  44.  
  45.             decimal commisionProducer = (allAlbums - (0.35M * allAlbums)) - (0.20M * (allAlbums - (0.35M * allAlbums)));
  46.  
  47.             decimal concertProfit = numberConcerts * profitSingleEuro*1.94M;
  48.  
  49.             decimal isGreater = concertProfit - (concertProfit * 0.15M);
  50.  
  51.             //Concerts profit (more than 100000)
  52.  
  53.             if (concertProfit > 100000.00M)
  54.             {
  55.                 if (isGreater >= commisionProducer)
  56.                 {
  57.                     Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.", isGreater);
  58.                 }
  59.                 else if (commisionProducer >= concertProfit)
  60.                 {
  61.                     Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
  62.                 }
  63.  
  64.             }
  65.             else if (commisionProducer >= isGreater)
  66.             {
  67.                 Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
  68.             }
  69.  
  70.             //Concerts profit (less than 100000)
  71.  
  72.             else if (concertProfit <= 100000.00M)
  73.             {
  74.                 if (concertProfit >= commisionProducer)
  75.                 {
  76.                     Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.", concertProfit);
  77.                 }
  78.             }
  79.             else if (commisionProducer >= concertProfit)
  80.             {
  81.                 Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
  82.             }
  83.         }
  84.     }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement