Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TextPlocessing.Lab;
- import java.util.Scanner;
- public class O2RepeatStrings {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String[] input = scanner.nextLine().split(" ");
- StringBuilder result = new StringBuilder();
- for (String word : input) {
- result.append(word.repeat(word.length()));
- }
- System.out.println(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment