Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. internal class MainClass
  5. {
  6.     public static void Main(string[] args)
  7.     {
  8.         string st = Console.ReadLine();
  9.         List<int> list = new List<int>();
  10.         int count = 0;
  11.  
  12.         for (int i = 0; i < st.Length / 2; i++)
  13.         {
  14.             Console.WriteLine(st[1]);
  15.             if (st[i] == st.Length - i)
  16.             {
  17.                 count += 1;
  18.             }
  19.         }
  20.         Console.WriteLine(count);
  21.         Console.ReadKey();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement