Advertisement
fbinnzhivko

01. The Better Music Producer

Mar 16th, 2016
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.55 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         decimal dolarRate = 1.72m;
  7.         decimal evroRate = 1.94m;
  8.         decimal pesos = 332.74m;
  9.        
  10.         decimal albumsEurope = decimal.Parse(Console.ReadLine());
  11.         decimal evroprice = decimal.Parse(Console.ReadLine());
  12.         decimal albumsNorthAmerica = decimal.Parse(Console.ReadLine());
  13.         decimal dollarsPrice = decimal.Parse(Console.ReadLine());
  14.         decimal albumsSouthamerica = decimal.Parse(Console.ReadLine());
  15.         decimal pesosprice = decimal.Parse(Console.ReadLine());
  16.         decimal concertsDuringTour = decimal.Parse(Console.ReadLine());
  17.         decimal moneyConcerEuro = decimal.Parse(Console.ReadLine());
  18.  
  19.         decimal Europe = albumsEurope * evroprice * evroRate;
  20.         decimal NorthAmerica = albumsNorthAmerica * dollarsPrice * dolarRate;
  21.         decimal Southamerica = albumsSouthamerica * pesosprice / pesos;
  22.         decimal allAlbums = Europe + NorthAmerica + Southamerica;
  23.  
  24.         decimal totalallAlbums = (allAlbums * 0.65m) * 0.80m;
  25.      
  26.         decimal concertProfit = concertsDuringTour * moneyConcerEuro * evroRate;
  27.      
  28.         if (concertProfit > 100000){concertProfit = concertProfit * 0.85m;}
  29.        
  30.         if (concertProfit >= totalallAlbums)
  31.         {
  32.             Console.WriteLine("On the road again! We'll see the world and earn {0:f2}lv.", concertProfit);
  33.         }
  34.         else
  35.         {
  36.             Console.WriteLine("Let's record some songs! They'll bring us {0:f2}lv.", totalallAlbums);
  37.         }
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement