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 Exam_Maiden_Party
- {
- class Program
- {
- static void Main(string[] args)
- {
- double partyPrice = double.Parse(Console.ReadLine());
- int countMassage = int.Parse(Console.ReadLine());
- int countRoses = int.Parse(Console.ReadLine());
- int countHolder = int.Parse(Console.ReadLine());
- int countCaricature = int.Parse(Console.ReadLine());
- int countSurprise = int.Parse(Console.ReadLine());
- double loveMassage = 0.60;
- double waxRoses = 7.20;
- double keyHolder = 3.60;
- double caricature = 18.20;
- double luckSurprise = 22.00;
- int allArticles = countMassage + countRoses + countHolder + countCaricature + countSurprise;
- double allSum = countMassage * loveMassage + countRoses * waxRoses + countHolder * keyHolder + countCaricature * caricature + countSurprise * luckSurprise;
- if (allArticles >= 25)
- {
- allSum *= 0.65;
- }
- else
- {
- allSum *= 1;
- }
- double moneyHost = allSum * 0.10;
- double profit = allSum - moneyHost;
- if (profit > partyPrice)
- {
- Console.WriteLine($"Yes! {profit - partyPrice} lv left.");
- }
- else if (profit < partyPrice)
- {
- Console.WriteLine($"Not enough money! {partyPrice - profit} lv needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment