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)
- //промяна: +1
- for (int position = 0; position <= text.length() - 1; position++) {
- System.out.println(text.charAt(position));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement