Advertisement
kanciastopantalones

zad 8 _ co litere

Dec 6th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. StringBuilder result = new StringBuilder();
  2. for (int i = 0; i < input.length(); i++) {
  3. if (i > 0) {
  4. result.append("_");
  5. }
  6.  
  7. result.append(input.charAt(i));
  8. }
  9.  
  10. System.out.println(result.toString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement