kisame1313

Untitled

Jul 15th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. #region trololo
  2. using System;
  3.  
  4. namespace TestProgram
  5. {
  6.     class MyClass
  7.     {
  8.         static void Main ()
  9.         {
  10.             #endregion
  11.             string [] notes;
  12.  
  13.             Console.WriteLine ( "Введите количество записок" );
  14.             int notesCount = Convert.ToInt32 ( Console.ReadLine () );
  15.  
  16.             notes = new string [notesCount];
  17.  
  18.             for ( int i = 0 ; i < notes.Length ; i++ )
  19.             {
  20.                 notes [i] = Console.ReadLine ();
  21.             }
  22.  
  23.             Console.Clear ();
  24.             Console.ForegroundColor = ConsoleColor.Green;
  25.            
  26.         }
  27.  
  28.         static int MaxLength ( string [] arr )
  29.         {
  30.             string tempStr = arr [0];
  31.             foreach ( string i in arr )
  32.             {
  33.                 if ( i.Length < tempStr.Length ) ;
  34.             }
  35.             return tempStr.Length;
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment