Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Task02
- {
- class Program
- {
- static void Main(string[] args)
- {
- String EGN = Console.ReadLine();
- int genderNum = int.Parse(EGN.Substring(8, 1));
- int cityNumbers = int.Parse(EGN.Substring(6, 3));
- String gender = "";
- String city = "";
- if (genderNum % 2 == 0)
- {
- gender = "man";
- }
- else
- {
- gender = "woman";
- }
- if (cityNumbers >= 0 && cityNumbers <= 43)
- {
- city = "Благоевград";
- }
- else if (cityNumbers > 43 && cityNumbers <= 93)
- {
- city = "Бургас";
- }
- else if (cityNumbers > 93 && cityNumbers <= 139)
- {
- city = "Варна";
- }
- else if (cityNumbers > 139 && cityNumbers <= 169)
- {
- city = "Велико Търново";
- }
- else if (cityNumbers > 169 && cityNumbers <= 183)
- {
- city = "Видин";
- }
- else if (cityNumbers > 183 && cityNumbers <= 217)
- {
- city = "Враца";
- }
- else if (cityNumbers > 217 && cityNumbers <= 233)
- {
- city = "Габрово";
- }
- else if (cityNumbers > 233 && cityNumbers <= 281)
- {
- city = "Кърджали";
- }
- else if (cityNumbers > 281 && cityNumbers <= 301)
- {
- city = "Кюстендил";
- }
- else if (cityNumbers > 301 && cityNumbers <= 319)
- {
- city = "Ловеч";
- }
- else if (cityNumbers > 319 && cityNumbers <= 341)
- {
- city = "Монтана";
- }
- else if (cityNumbers > 341 && cityNumbers <= 377)
- {
- city = "Пазарджик";
- }
- else if (cityNumbers > 377 && cityNumbers <= 395)
- {
- city = "Перник";
- }
- else if (cityNumbers > 395 && cityNumbers <= 435)
- {
- city = "Плевен";
- }
- else if (cityNumbers > 435 && cityNumbers <= 501)
- {
- city = "Пловдив";
- }
- else if (cityNumbers > 501 && cityNumbers <= 527)
- {
- city = "Разград";
- }
- else if (cityNumbers > 527 && cityNumbers <= 555)
- {
- city = "Русе";
- }
- else if (cityNumbers > 555 && cityNumbers <= 575)
- {
- city = "Силистра";
- }
- else if (cityNumbers > 575 && cityNumbers <= 601)
- {
- city = "Сливен";
- }
- else if (cityNumbers > 601 && cityNumbers <= 623)
- {
- city = "Смолян";
- }
- else if (cityNumbers > 623 && cityNumbers <= 721)
- {
- city = "София-град";
- }
- else if (cityNumbers > 721 && cityNumbers <= 751)
- {
- city = "София-окръг";
- }
- else if (cityNumbers > 751 && cityNumbers <= 789)
- {
- city = "Стара Загора";
- }
- else if (cityNumbers > 789 && cityNumbers <= 821)
- {
- city = "Добрич(Толбухин)";
- }
- else if (cityNumbers > 821 && cityNumbers <= 843)
- {
- city = "Търговище";
- }
- else if (cityNumbers > 843 && cityNumbers <= 871)
- {
- city = "Хасково";
- }
- else if (cityNumbers > 871 && cityNumbers <= 903)
- {
- city = "Шумен";
- }
- else if (cityNumbers > 903 && cityNumbers <= 925)
- {
- city = "Ямбол";
- }
- else if (cityNumbers > 926 && cityNumbers <= 999)
- {
- city = "Друг/Неизвестен";
- }
- Console.WriteLine(gender);
- Console.WriteLine(city);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement