Guest User

using System; using System.Collections.Generic; using System

a guest
Oct 19th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.74 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 Problem1
  8. {
  9.     class Problem1
  10.     {
  11.         static void Main()
  12.         {
  13.             int albumsEU = int.Parse(Console.ReadLine());
  14.             decimal priceEU = decimal.Parse(Console.ReadLine());
  15.             int albumsNA = int.Parse(Console.ReadLine());
  16.             decimal priceNA = decimal.Parse(Console.ReadLine());
  17.             int albumsSA = int.Parse(Console.ReadLine());
  18.             decimal priceSA = decimal.Parse(Console.ReadLine());
  19.             int concerts = int.Parse(Console.ReadLine());
  20.             decimal priceConcert = decimal.Parse(Console.ReadLine());
  21.  
  22.             decimal priceEUleva = priceEU * 1.94m;
  23.             decimal priceNAleva = priceNA * 1.72m;
  24.             decimal priceSAleva = priceSA / 332.74m;
  25.             decimal concertLeva = priceConcert * 1.94m;
  26.  
  27.             decimal totalAlbums = albumsEU * priceEUleva + albumsNA * priceNAleva + albumsSA * priceSAleva;
  28.  
  29.             decimal withoutProducerProfit = totalAlbums - totalAlbums * 0.35m;
  30.             decimal afterTaxes = withoutProducerProfit - withoutProducerProfit * 0.20m;
  31.  
  32.             decimal concertProfit = concertLeva * concerts;
  33.  
  34.             if (concertProfit > 100000)
  35.             {
  36.                 concertProfit = concertProfit - concertProfit*0.15m;
  37.  
  38.             }
  39.  
  40.             if (afterTaxes > concertProfit)
  41.             {
  42.                 Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.",afterTaxes);
  43.             }
  44.             else
  45.             {
  46.                 Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.",concertProfit);
  47.             }
  48.  
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment