C# Program to Print Map of India Using ASCII Characters on Command Line Full Project For Beginners

  • Post author:
  • Post category:c#
  • Post comments:0 Comments

 

 

main.cs

 

 

// C# program to print map of India
using System;

class GFG
{
	public static void Main()
	{
		int a = 10, b = 0, c = 10;
		
		// The encoded string after removing first 31 characters
		// Its individual characters determine how many spaces
		// or exclamation marks to draw consecutively.
		string s1 = "TFy!QJu ROo TNn(ROo)SLq SLq ULo+UHs UJq TNn*RPn/QP,\n"
		+ "bEWS_JSWQAIJO^NBELPeHBFHT}TnALVlBLOFAkHFOuFETpHCStHAUFAgcEAelc,\n"
		+ "lcn^r^r\\tZvYxXyT|S~Pn SPm SOn TNn ULo0ULo#ULo-WHq!WFs XDt!";
		
		// read each character of encoded string
		a = s1[b];
		
		while (a != 0)
		{
			if (b < 170)
			{
				a = s1[b];
				b++;
				while (a-- > 64)
				{
					
					if (++c == 'Z')
					{
						
						c/=9;
						
					Console.Write((char)(c));
					}
					else
					Console.Write((char)(33 ^ (b & 0x01)));
				}
			}
			else
				break;
		}
	}
}

//This code is contributed by vt_m.

Leave a Reply