Advertisement
veronikaaa86

05. Character Sequence

Jul 24th, 2021
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package forLoop;
  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. int length = text.length();
  12.  
  13. for (int i = 0; i < length; i++) {
  14. char symbol = text.charAt(i);
  15.  
  16. System.out.println(symbol);
  17. }
  18.  
  19. }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement