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 _6.Сватбени_места
- {
- class Program
- {
- static void Main(string[] args)
- {
- string posledenSektor = Console.ReadLine();
- int broiRedoveNa1Sektor = int.Parse(Console.ReadLine());
- var broiMestaNe4etenRed = int.Parse(Console.ReadLine());
- char ch = char.Parse(posledenSektor);
- string f = broiMestaNe4etenRed.ToString();
- char ch1 = char.Parse(f);
- int count = 0;
- int sum = 0;
- for (char i = 'A'; i <= ch; i++)
- {
- if (i>97)
- {
- broiRedoveNa1Sektor+=1;
- }
- for (int j = 1; j <= broiRedoveNa1Sektor; j++)
- {
- if (j % 2 == 0)
- {
- for (char k = 'a'; k <= 'd'; k++)
- {
- Console.WriteLine($"{i}{j}{k} ");
- sum++;
- }
- }
- else
- {
- for (char k = 'a'; k <= 'b'; k++)
- {
- Console.WriteLine($"{i}{j}{k} ");
- sum++;
- }
- }
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Add Comment
Please, Sign In to add comment