GET ASCII VALUE OF ANY NUMBER
ASCII VALUE MEANS "American standard code for informantion interchane"
For example:
10 in human understandable language:
ASCII value will be 49:
PROGRAM:
import java.util.*;
class GetASCII
{
public static void main()
{
char a;
short value;
Scanner sc=new Scanner(System.in);
System.out.print("Enter a character : ");
a=sc.next().charAt(0);
value=(short)a;
System.out.print("ASCII value of "+a+ " : "+value);
}
}
OUTPUT
1 Comments
Good and easy program
ReplyDelete