S =INPUT
N S ARB . L ANY('aeiou') . C REM . S :F(O)
X =1 - X
C =CHAR(ORD(C) - 32) EQ(X)
O =O L C :(N)
O OUTPUT =O S
END
Try it online!
Explanation:
S =INPUT ;* Read input
N S ARB . L ANY('aeiou') . C REM . S :F(O)
;* Match in S:
;* ARBitrary string (store as L), ANY single vowel (store as C)
;* and the REMainder of the string (store as S).
;* If there is no match, goto O.
X =1 - X ;* Set X (initially treated as 0) to 1-X.
C =CHAR(ORD(C) - 32) EQ(X) ;* if X == 0, set C to uppercase, otherwise do nothing.
O =O L C :(N) ;* append to O L and C, then goto N.
O OUTPUT =O S ;* Output updated string
END