Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 3
deleted 10 characters in body
J.Doe
  • 2.7k
  • 12
  • 15

R, 95 bytes

Just run through the upper case alphabet repeatedly while advancing a counter by 1 if you encounter the letter in the counter position of the word and printing out the letter, a space otherwise.

function(s)while(F>""){for(l in LETTERS)cat("if"((F=substr(s,T,T))==l,{T=T+1;l}," "));cat("
")}

Try it online!

J.Doe
  • 2.7k
  • 12
  • 15

AltStyle によって変換されたページ (->オリジナル) /