veronikaaa86

05. Character Sequence

Jun 3rd, 2023
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. package forLoops;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P05CharacterSequence {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         String text = scanner.nextLine();
  10.  
  11.         for (int i = 0; i < text.length(); i++) {
  12.             char symbol = text.charAt(i);
  13.  
  14.             System.out.println(symbol);
  15.         }
  16.     }
  17. }
  18.  
Add Comment
Please, Sign In to add comment