Advertisement
Codex

Ascii

Jul 1st, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. /*This program finds the ascii value of any number entered by user*/
  2. import java.util.*
  3. class ASCII
  4. {
  5.  public static void main(String args[])
  6.   {
  7.      Scanner sc=new Scanner(System.in);
  8.      char ch=(sc.next()).charAt(0);
  9.      int asc=ch;
  10.      System.out.println("ascii of "+ch+" is "+asc);
  11.      
  12.      
  13.   }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement