PE1 (AY24/25)
Last updated
Last updated
This question utilizes the function , where the i
position variable is crucial! After knowing this function, I rewrite my solution as follows
The idea is to set a variable times
indicating we have encountered an open <U>
and we should start printing the upper case letters. And once we encounter a closing </U>
, we set our times to be 0. And notice that the awesome point of the position i
is that we deal with one character at a time!