Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- using namespace std;
- string AddString(string s) {
- string s2 = "";
- for(int i = 0; i < s.size(); ++i){
- s2 += toupper(s[i]);
- s2 += string(i,tolower(s[i]));
- s2 += '-';
- }
- return s2;
- }
- int main() {
- string s = "ALnske";
- cout << AddString(s) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement