This time no story, no theory. The examples below show you how to write function
Accumul::accum("abcd"); // "A-Bb-Ccc-Dddd" Accumul::accum("RqaEzty"); // "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy" Accumul::accum("cwAt"); // "C-Ww-Aaa-Tttt"
The parameter of accum is a string which includes only letters from
There are three rules to this problem. First, the repetition time of each alphabet increases by 1. Second, if the alphabet is uppercase, change it to all lowercase letters except the first alphabet. Third, if the first alphabet is lowercase, change it to uppercase.
So, write the code is correct for each condition, the others are simple.