Print out the alphabet and ascii value

/* Print out the alphabet and ascii value on one line of output.
e.g. A 65 B 66 C 67….Z 90 */


class sixth
{
public static void main(String args[])
{
char ch='a';

for(int i=65;i<=90;i++)
{
ch=(char)i;
System.out.print(" "+ch+" ascii is => ");
System.out.println(" "+i);
}
}
}

1 comments:

Unknown said...

nice program

Post a Comment