Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public class Main {
  2.  
  3. public static void main(String[] args) {
  4. go("cevad");
  5. }
  6.  
  7. public static void go(String str){
  8. for (int i=str.length(); i>0; i--){
  9. System.out.println(str.substring(0,i));
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement