desislava_topuzakova

05. Print Part Of ASCII Table

Sep 24th, 2021
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. package Test;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class PrintPartOfAsciiTable_05 {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8. int startNumber = Integer.parseInt(scanner.nextLine());
  9. int endNumber = Integer.parseInt(scanner.nextLine());
  10.  
  11. //всеки код от първия до последния
  12. //печатам символа срещу кода
  13. for (int code = startNumber; code <= endNumber; code++) {
  14. System.out.print((char)code + " ");
  15. }
  16. }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment