Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 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 test
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int dancers = int.Parse(Console.ReadLine());
  14. decimal score = decimal.Parse(Console.ReadLine());
  15. string season = Console.ReadLine().ToLower();
  16. string place = Console.ReadLine().ToLower();
  17. decimal totalscore = 0.00m;
  18. decimal score1 = 0.00m;
  19. if (place == "bulgaria")
  20. {
  21. totalscore = score * dancers;
  22. if (season == "summer")
  23. {
  24. score1 = totalscore * 0.95m;
  25. }
  26. else if (season == "winter")
  27. {
  28. score1 = totalscore * 0.92m;
  29. }
  30. var cherity = score1 * 0.75m;
  31. var leftMoney = (score1 - cherity) / dancers;
  32.  
  33. Console.WriteLine("Charity - {0:f2}", cherity);
  34. Console.WriteLine("Money per dancer - {0:f2}", leftMoney);
  35. }
  36.  
  37. else if (place == "abroad")
  38. {
  39. totalscore = score * dancers * 1.5m;
  40. if (season == "summer")
  41. {
  42. score1 = totalscore * 0.9m;
  43. }
  44. else if (season == "winter")
  45. {
  46. score1 = totalscore * 0.85m;
  47. }
  48. var cherity = score1 * 0.75m;
  49. var leftMoney = (score1 - cherity) / dancers;
  50.  
  51. Console.WriteLine("Charity - {0:f2}", cherity);
  52. Console.WriteLine("Money per dancer - {0:f2}", leftMoney);
  53. }
  54. }
  55.  
  56.  
  57.  
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement