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;
- class PerfectGirlfriend
- {
- static void Main()
- {
- string inputData = Console.ReadLine();
- int counter = 0;
- while (inputData!="Enough dates!")
- {
- int day = 0;
- var inputParams = inputData.Split('\\');
- var braCM = int.Parse(inputParams[2].Substring(0, inputParams[2].Length-1));
- int sizeBra = inputParams[2][inputParams[2].Length-1];
- int rezult = braCM * sizeBra;
- char fistLetter = inputParams[3][0];
- int sumTel = 0;
- int calculations = 0;
- switch (inputParams[0])
- {
- case "Monday":
- day += 1;
- break;
- case "Tuesday":
- day += 2;
- break;
- case "Wednesday":
- day += 3;
- break;
- case "Thursday":
- day += 4;
- break;
- case "Friday":
- day += 5;
- break;
- case "Saturday":
- day += 6;
- break;
- case "Sunday":
- day += 7;
- break;
- default:
- break;
- }
- for (int i = 0; i < inputParams[1].Length; i++)
- {
- sumTel += (inputParams[1][i] - '0');
- }
- int sumName = fistLetter * inputParams[3].Length;
- calculations = (day + sumTel + rezult) - sumName;
- if (calculations>=6000)
- {
- counter++;
- Console.WriteLine("{0} is perfect for you.", inputParams[3]);
- }
- else
- {
- Console.WriteLine("Keep searching, {0} is not for you.", inputParams[3]);
- }
- inputData = Console.ReadLine();
- }
- Console.WriteLine(counter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement