Advertisement
ntamas

színezett

Mar 28th, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1.     using System;
  2.     using System.Collections.Generic;
  3.     using System.Linq;
  4.     using System.Text;
  5.     using System.Diagnostics;
  6.     using System.Threading;
  7.      
  8.     namespace ConsoleApplication1
  9.     {
  10.       class Program
  11.       {
  12.         static void Main(string[] args)
  13.         {
  14.           int a = Convert.ToInt32(Console.ReadLine());
  15.           int b, c;
  16.           Random vel = new Random();
  17.           Random vel2 = new Random();
  18.           while (true)
  19.           {
  20.             b = vel2.Next(0, 15);
  21.             c = vel2.Next(0, 15);
  22.             Type type = typeof(ConsoleColor);
  23.             Console.BackgroundColor = (ConsoleColor)b;
  24.             Console.ForegroundColor = (ConsoleColor)c;
  25.             Console.Write("{0} ", vel.Next(1, a));
  26.             Thread.Sleep(3);
  27.           }
  28.           Console.ReadKey();
  29.         }
  30.       }
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement