AlexRaynor

Untitled

Feb 13th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. class Scooter
  2.     {
  3.         static void Main(string[] args)
  4.         {
  5.             string[] messages = { "Уан", "ту", "фри", "файааааа!!!" };
  6.             Console.WriteLine("Введите цвет (цифрой)");
  7.             int NewColor = Convert.ToInt32(Console.ReadLine());
  8.  
  9.             ConsoleColor color = (ConsoleColor)NewColor;
  10.             WriteAll(messages, color);
  11.         }
  12.  
  13.  
  14.  
  15.         static void WriteAll(string[] messages, ConsoleColor color)
  16.         {
  17.             Console.ForegroundColor = color;
  18.             for (int i = 0; i < messages.Length; i++)
  19.             {
  20.                 Console.WriteLine(messages[i]);
  21.             }
  22.  
  23.            
  24.         }
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment