Advertisement
Guest User

rest

a guest
Feb 23rd, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 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 Bachelor_Party
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double priceSinger = double.Parse(Console.ReadLine());
  14.  
  15. string comand = Console.ReadLine();
  16.  
  17. double countPeople = 0;
  18. double countGroup = 0;
  19. double countCovertForOnePerson = 0;
  20.  
  21. while (comand != "The restaurant is full")
  22. {
  23. double countPeopleInGroup = double.Parse(comand);
  24. countGroup += countPeopleInGroup;
  25.  
  26.  
  27. if (countGroup< 5)
  28. {
  29. countCovertForOnePerson += 100;
  30.  
  31. }
  32. else if (countGroup>=5)
  33. {
  34. countCovertForOnePerson += 70;
  35. }
  36. countGroup += countCovertForOnePerson;
  37. countPeopleInGroup = double.Parse(Console.ReadLine());
  38.  
  39.  
  40. }
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement