Untitled

mail@pastecode.io avatar
unknown
c_cpp
8 months ago
536 B
0
Indexable
Never

#include <iostream>
#include <string>
using namespace std;

string letters(string a) {
    for (char &c: a) {
        if (c == 'o') {
            c = 'a';
        }
        else if (c == 'a') {
            c = 'o';
        }
        else if (c == 'A') {
            c = 'O';
        }
        else if (c == 'A') {
            c = 'O';
        }
    }
    return a;
}

int main()
{
    string Name;
    cin >> Name;

    string AName = letters(Name);

    cout << AName << endl;


    return 0;
}

Leave a Comment