Krasimir_Slavov

Untitled

Nov 10th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 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 Exam_Maiden_Party
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double partyPrice = double.Parse(Console.ReadLine());
  14. int countMassage = int.Parse(Console.ReadLine());
  15. int countRoses = int.Parse(Console.ReadLine());
  16. int countHolder = int.Parse(Console.ReadLine());
  17. int countCaricature = int.Parse(Console.ReadLine());
  18. int countSurprise = int.Parse(Console.ReadLine());
  19.  
  20. double loveMassage = 0.60;
  21. double waxRoses = 7.20;
  22. double keyHolder = 3.60;
  23. double caricature = 18.20;
  24. double luckSurprise = 22.00;
  25.  
  26. int allArticles = countMassage + countRoses + countHolder + countCaricature + countSurprise;
  27. double allSum = countMassage * loveMassage + countRoses * waxRoses + countHolder * keyHolder + countCaricature * caricature + countSurprise * luckSurprise;
  28.  
  29. if (allArticles >= 25)
  30. {
  31. allSum *= 0.65;
  32. }
  33. else
  34. {
  35. allSum *= 1;
  36. }
  37. double moneyHost = allSum * 0.10;
  38. double profit = allSum - moneyHost;
  39.  
  40. if (profit > partyPrice)
  41. {
  42. Console.WriteLine($"Yes! {profit - partyPrice} lv left.");
  43. }
  44. if (profit < partyPrice)
  45. {
  46. Console.WriteLine($"Not enough money! {partyPrice - profit} lv needed.");
  47. }
  48.  
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment