Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _01.BetterMusic
- {
- class BetterMusic
- {
- static void Main(string[] args)
- {
- //1. The number of albums sold in Europe
- uint numberOfEuropeAlbums = uint.Parse(Console.ReadLine());
- //2. The price of an album in euro
- decimal priceOfAlbumEuro = decimal.Parse(Console.ReadLine());
- //3. The number of albums sold in North America
- uint albumsNorthAmerica = uint.Parse(Console.ReadLine());
- //4. The price of an album in dollars
- decimal priceAlbumDollars = decimal.Parse(Console.ReadLine());
- //5.The number of albums sold in South America
- uint albumsSouthAmerica = uint.Parse(Console.ReadLine());
- //6. Price of an album in pesos
- decimal priceInPesos = decimal.Parse(Console.ReadLine());
- // 7.The number of concerts during a tour
- uint numberConcerts = uint.Parse(Console.ReadLine());
- //8. Profit from a single concert in euro
- decimal profitSingleEuro = decimal.Parse(Console.ReadLine());
- decimal numberOfEuropeAlbumsProfit = numberOfEuropeAlbums * priceOfAlbumEuro*1.94M;
- decimal northAmerica = albumsNorthAmerica * priceAlbumDollars*1.72M;
- decimal southAmerica = albumsSouthAmerica * priceInPesos/332.74M;
- decimal allAlbums = (numberOfEuropeAlbumsProfit + northAmerica + southAmerica);
- decimal commisionProducer = (allAlbums - (0.35M * allAlbums)) - (0.20M * (allAlbums - (0.35M * allAlbums)));
- decimal concertProfit = numberConcerts * profitSingleEuro*1.94M;
- decimal isGreater = concertProfit - (concertProfit * 0.15M);
- //Concerts profit (more than 100000)
- if (concertProfit > 100000.00M)
- {
- if (isGreater >= commisionProducer)
- {
- Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.", isGreater);
- }
- else if (commisionProducer >= concertProfit)
- {
- Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
- }
- }
- else if (commisionProducer >= isGreater)
- {
- Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
- }
- //Concerts profit (less than 100000)
- else if (concertProfit <= 100000.00M)
- {
- if (concertProfit >= commisionProducer)
- {
- Console.WriteLine("On the road again! We'll see the world and earn {0:F2}lv.", concertProfit);
- }
- }
- else if (commisionProducer >= concertProfit)
- {
- Console.WriteLine("Let's record some songs! They'll bring us {0:F2}lv.", commisionProducer);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement