desislava_topuzakova

05. Character Sequence

Apr 24th, 2021
897
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class StreamLetters {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         String text = scanner.nextLine();
  7.         //Softuni
  8.         //отпечатваме символи -> позиции
  9.         // начална стойност: 0
  10.         // крайна стойност: дължина - 1
  11.  
  12.         for(int position = 0; position <= text.length() - 1; position++){
  13.             System.out.println(text.charAt(position));
  14.         }
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment