Advertisement
therrontelford

Number to character

Nov 14th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Exercise4_8Ascii {
  3.  
  4.     public static void main(String[] args) {
  5.         Scanner kb = new Scanner(System.in);
  6.         System.out.println("Enter an integer between 0 and 127");
  7.         int asciiNumber = kb.nextInt();
  8.        
  9.         char symbol = (char)(asciiNumber);
  10.         System.out.println(symbol);
  11.  
  12.     }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement