Advertisement
deyanmalinov

01. Repeat strings

Mar 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. package DPM;
  2.  
  3. import java.util.*;
  4.  
  5. public class Main {
  6.     public static void main(String[] args) {
  7.         Scanner scan = new Scanner(System.in);
  8.         String [] line = scan.nextLine().split(" ");
  9.         for (int i = 0; i < line.length; i++) {
  10.             String ele = line[i];
  11.             int lenght = ele.length();
  12.             for (int j = 0; j < lenght; j++) {
  13.                 System.out.print(ele);
  14.             }
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement