Advertisement
Guest User

hnt

a guest
Dec 6th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Main {
  4. static String qwerty(String stroka) {
  5. stroka.trim();
  6. String [] slova= stroka.split(" ");
  7. StringBuilder luchshe = new StringBuilder();
  8. for (int a = 0; a<slova.length; a++){
  9. if(!slova[a].equals("") && a != slova.length-1){
  10. if()
  11. }
  12. else if (!slova[a].equals("") && a == slova.length-1){
  13. luchshe.append("Грут");
  14. }
  15. }String grut = luchshe.toString();
  16. return grut;
  17. }
  18.  
  19. public static void main(String[] args) {
  20. Scanner in = new Scanner(System.in);
  21. String stroka = in.nextLine();
  22. System.out.println(qwerty(stroka));
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement