Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication6
  8. {
  9.     class Program
  10.     {
  11.    static void Main(string[] args)
  12.         {
  13.             string array_word_and_numeral = "qwertyuiopasdfghjklzxcvbnm1234567890йцукенгшщзхъфывапролджэячсмитьбюё";
  14.             string array = Console.ReadLine();
  15.             if (array.Length == 29)
  16.             {
  17.                 int a = 0;
  18.                 int b = 0;
  19.                 int i = 0;
  20.                 int n = 0;
  21.                 for (int j = 0; j < 5; j++)
  22.                 {
  23.                     for (; i < 5 + n; i++)
  24.                     {
  25.                         char[] chr = { array[i] };
  26.                         string text = new string(chr);
  27.                         if (array_word_and_numeral.Contains(text) == false)
  28.                         {
  29.                             a++;
  30.                         }
  31.                     }
  32.                     if (a == 0)
  33.                     {
  34.                         n = n + 6;
  35.                         i++;
  36.                     }
  37.                     else if (a != 0)
  38.                     {
  39.                         j = 5;
  40.                     }
  41.                 }
  42.                 if (a == 0)
  43.                 {
  44.                     for (int k = 5; k < array.Length; k = k + 6)
  45.                     {
  46.                         char[] chr = { array[k] };
  47.                         string text = new string(chr);
  48.                         if (text != "-")
  49.                         {
  50.                             b++;
  51.                         }
  52.                     }
  53.                 }
  54.                 if (a != 0 || b != 0)
  55.                 {
  56.                     Console.WriteLine("False");
  57.                 }
  58.                 else if (a == 0 & a == 0)
  59.                 {
  60.                     Console.WriteLine("True");
  61.                 }
  62.             }
  63.             else
  64.             {
  65.                 Console.WriteLine("False");
  66.             }
  67.         }
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement