Advertisement
Qrist

India Map

Apr 7th, 2020
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.13 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace GitHub
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int[] data = {20,6,74,10,71,15,67,14,64,15,66,12,68,12,70,12,68,8,72,10,69,14,64,16,63,16,34,
  11.                            5,23,19,31,10,19,23,17,1,9,10,15,30,14,2,5,12,16,37,8,2,6,8,20,61,20,46,1,12,
  12.                             22,44,2,12,15,6,1,43,8,6,15,53,6,5,20,48,8,3,19,52,8,1,21,6,1,39,35,5,1,37,44,
  13.                             35,44,35,46,30,50,30,50,28,52,26,54,25,56,24,57,20,60,19,62,16,65,16,64,15,66,
  14.                             14,67,12,68,12,68,12,70,8,72,6,75,4,52,0
  15.                          };
  16.             int c = 0;
  17.             int linecount = 0;
  18.             for (int b = 0; data[b] != 0; b++)
  19.             {
  20.                 for (int a = data[b]; a > 0; a--)
  21.                 {
  22.                     c++;
  23.                     if (c == 80)
  24.                     {
  25.                         c = 0;
  26.                         Console.WriteLine();
  27.                         linecount++;
  28.                     }
  29.                     else if (b % 2 == 0)
  30.                     {
  31.                         Console.Write(" ");
  32.                     }
  33.                     else
  34.                     {
  35.                         if (linecount < 16)
  36.                         {
  37.                             Console.ForegroundColor = ConsoleColor.Red;
  38.                             Console.Write("!");
  39.                         }
  40.                         else if (linecount > 15 && linecount < 31)
  41.                         {
  42.                             Console.ForegroundColor = ConsoleColor.White;
  43.                             Console.Write("!");
  44.                         }
  45.                         else
  46.                         {
  47.                             Console.ForegroundColor = ConsoleColor.Green;
  48.                             Console.Write("!");
  49.                         }
  50.  
  51.                     }
  52.                 }
  53.             }
  54.             Console.WriteLine();
  55.             Console.CursorSize = 15;
  56.             Console.WriteLine("I Love My India - Chandra Kant Hatwal");
  57.             Console.Read();
  58.         }
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement