Untitled

 avatar
unknown
c_cpp
2 years ago
536 B
9
Indexable

#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;
}

Editor is loading...
Leave a Comment