Advertisement
triplex239

task 7 page 380

Oct 13th, 2020
1,829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. class MyClass
  2.     {
  3.        
  4.         static void Main()
  5.         {
  6.             Console.WriteLine("Введите предложение: ");
  7.             string Text = Console.ReadLine();
  8.             Console.WriteLine(Substring(Text));
  9.         }
  10.         static string Substring (string X)
  11.         {
  12.             char[] Ar = new char[X.Length];
  13.             for (int k = 0; k < X.Length; k++)
  14.             {
  15.                 Ar[k] = X[k];
  16.             }
  17.             String A = new string(Ar, 1, 5);
  18.              return A;
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement