Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class StreamOfLetters_05 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String text = scanner.nextLine();
- //"softuni"
- //всяка позиция от 0 до послендата (дължина - 1)
- //повтарям: взимам символа на позицията + отпечатвам
- //начало: 0
- //край: дължина - 1
- //промяна: ++
- for (int position = 0; position <= text.length() - 1; position++) {
- char currentSymbol = text.charAt(position);
- System.out.println(currentSymbol);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement