Blogger Widgets


C# Program to Print ASCII values and characters using a while loop
C# Program to Print ASCII values and their equivalent characters using a while loop

Problem Statement:
Write a program to print all the ASCII values and their equivalent characters using a while loop. The ASCII values vary from 0 to 255.

Solution:
static void Main(string[] args)
{
int i=0;
Console.WriteLine("ASCII Char");
while (i <= 255)
{
Console.WriteLine(i+" "+(char)i);
i++;
}
Console.ReadLine();
}



C# Program to Print ASCII values and characters using a while loop
07 Dec 2013

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top