import java.util.*;
class ascii
{
public static void main (String arg[])
throws java.io.IOException
{
int b;
char a;
Scanner in=new Scanner (System.in);
System.out.print ("\n\t Enter a character = ");
a=(char) System.in.read();
b=(int)a;
System.out.println ("\n\t The ASCII value of "+a+" is = "+b);
}
}
class ascii
{
public static void main (String arg[])
throws java.io.IOException
{
int b;
char a;
Scanner in=new Scanner (System.in);
System.out.print ("\n\t Enter a character = ");
a=(char) System.in.read();
b=(int)a;
System.out.println ("\n\t The ASCII value of "+a+" is = "+b);
}
}
No comments:
Post a Comment