Easy java for loop : This code prints yup to every second char(1,3,5,7,9..). Now I'm having a problem because I need also print a word for example " yap " to every fifth char(4,9,14,19...). So every tenth is yup yap etc... Appreciate if you have any hints or solution. Thank you for help!

for(int i = 0; i < word.length(); i++){

        if( i % 2 != 0 && i > 0)   {
            System.out.print(word.charAt(i) + " yup");
            System.out.println();
        }


        else{
            System.out.println(word.charAt(i));
        }

    }

