C# Program to Print Map of India Using ASCII Characters on Command Line

You may have come across many doubts and confusions in the article. We guarantee that all your queries will be resolved via the C# Program to Print Map of India Using ASCII Characters on Command Line article.

The full format of ASCII is the US Standard Code for Information Interchange. It is a written encryption scheme used for electronic communication. Each letter or a special character is represented by some ASCII code, and each ASCII code contains 7 bits of memory.

C# Program to Print Map of India Using ASCII Characters on Command Line

C# Program to Print Map of India Using ASCII Characters on Command Line

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.

Read Also:

Final Words

We hope the C# Program to Print Map of India Using ASCII Characters on Command Line article clears up your doubts and confusion. See you again in a good article. Thanks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment