Advertisement
desislava_topuzakova

05. Print Part Of ASCII Table

May 27th, 2022
697
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package DataTypesVariables;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class PrintPartOfAscii_05 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.         int startCode = Integer.parseInt(scanner.nextLine()); //60
  9.         int endCode = Integer.parseInt(scanner.nextLine()); //65
  10.  
  11.         //всеки код от първия до последния
  12.         for (int code = startCode; code <= endCode; code++) {
  13.             char symbol = (char) code;
  14.             System.out.print(symbol + " ");
  15.         }
  16.  
  17.     }
  18. }
  19.  
Advertisement
RAW Paste Data Copied
Advertisement