Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace HairSalon
- {
- class Program
- {
- static void Main(string[] args)
- {
- int target = int.Parse(Console.ReadLine());
- int sum = 0;
- while (target > sum)
- {
- string service = Console.ReadLine();
- if (service == "closed")
- {
- break;
- }
- else
- {
- string person = Console.ReadLine();
- if (service == "haircut")
- {
- if (person == "mens")
- {
- sum += 15;
- }
- else if (person == "ladies")
- {
- sum += 20;
- }
- else if (person == "kids")
- {
- sum += 10;
- }
- }
- else if (service == "color")
- {
- if (person == "touch up")
- {
- sum += 20;
- }
- else if (person == "full color")
- {
- sum += 30;
- }
- }
- }
- }
- if (sum >= target)
- {
- Console.WriteLine("You have reached your target for the day!");
- }
- else
- {
- Console.WriteLine($"Target not reached! You need {target - sum}lv. more.");
- }
- Console.WriteLine($"Earned money: {sum}lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement