niunzin

Untitled

Aug 18th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             for (int numero = 1; numero <= 100; numero += 1)
  15.             {
  16.                
  17.                 if (numero % 2 == 0)
  18.                 {
  19.                     Console.ForegroundColor = ConsoleColor.Yellow;
  20.                     Console.WriteLine("{0}", "- " + numero + "%");
  21.                 }
  22.                 else
  23.                 {
  24.                     Console.ForegroundColor = ConsoleColor.Green;
  25.                     Console.WriteLine("{0}", "- " + numero + "%");
  26.                 }
  27.                 Thread.Sleep(numero * 5);
  28.             }
  29.                 Console.ReadKey();
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment