alph <- LETTERS[1:26] vow <- c("A","E","I","O","U") for (x in alph){ if(x %in% vow){ count <- 1 while(count < 2){ repeat { print(x) count <- count + 1 if (count > 2){ break } } } }else { print(x) } }