Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Racecar {
- public static void main (String[] args) {
- char[] word = {'r','a','c','e','c','a','r'};
- for (int i = 0; i < 4; i++) {
- for (int j = i; j < word.length - i; j++) {
- System.out.print(word[j]);
- }
- System.out.println("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement