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 Bachelor_Party
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceSinger = double.Parse(Console.ReadLine());
- string comand = Console.ReadLine();
- double countPeople = 0;
- double countGroup = 0;
- double countCovertForOnePerson = 0;
- while (comand != "The restaurant is full")
- {
- double countPeopleInGroup = double.Parse(comand);
- countGroup += countPeopleInGroup;
- if (countGroup< 5)
- {
- countCovertForOnePerson += 100;
- }
- else if (countGroup>=5)
- {
- countCovertForOnePerson += 70;
- }
- countGroup += countCovertForOnePerson;
- countPeopleInGroup = double.Parse(Console.ReadLine());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement