Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ForLoop;
- import java.util.Scanner;
- public class StreamOfLetters_05 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String text = scanner.nextLine();
- //всяка една позиция в текста (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