Obfuscation of a string with respect to a natural number consists of changing all the letters by the letter that is places after in the alphabet.
For example, ofuscacio(1,'A') = 'B', because
'B' is one place after 'A'. Other examples:
ofuscacio(4,'B') = 'F' and
ofuscacio(2,'AB') = 'CD'.
The function recursive
void ofuscacio(int n, string s) must be implemented with
the following specification:
PRE: The input is an integer
such that
and a string of characters
such that
and
.
POST: writes to the output channel cout the
obfuscation of the string of characters
with respect to
.
If necessary, you can use the method pop_back() for
vectors and string.
Only recursive solutions are accepted.
Just send the function. The rest will be ignored.
An integer such that and a string of characters such that and .
For each pair n, s, the obfuscation of s
with respect to n.
Input/Output