program that replaces the CODE to VALUE.

Hello, I just wanted to help with my code
here's my questions

  1. How can I input "computer" in any in any order and case insensitively and still get the correct output?

Here are the replacement

COMPUTERS.X
1234567890.X
  1. If I input other letters that is not included in the COMPUTERS.X the program will terminate and ask again if i should input again.

example:

Input Code: Most.x
UNABLE TO CONVERT YOUR INPUT
INPUT AGAIN? Type YES to input again, type NO to end program:
  1. Is there any way or method to replace the whole string array instead of
    replace(CODES.begin(),CODES.end(),'C','1');

here's my code

    #include <iostream>
    #include <string.h>
    #include <algorithm>

    using namespace std;

    int main()
    {
        string CODES;
        char choice[5];

        do
        {
            cout << "Input code:  ";
            cin >> CODES;

        replace(CODES.begin(),CODES.end(),'C','1');
            replace(CODES.begin(),CODES.end(),'O','2');
            replace(CODES.begin(),CODES.end(),'M','3');
            replace(CODES.begin(),CODES.end(),'P','4');
            replace(CODES.begin(),CODES.end(),'U','5');
            replace(CODES.begin(),CODES.end(),'T','6');
            replace(CODES.begin(),CODES.end(),'E','7');
            replace(CODES.begin(),CODES.end(),'R','8');
            replace(CODES.begin(),CODES.end(),'S','9');
            replace(CODES.begin(),CODES.end(),'X','0');
            replace(CODES.begin(),CODES.end(),'c','1');
            replace(CODES.begin(),CODES.end(),'o','2');
            replace(CODES.begin(),CODES.end(),'m','3');
            replace(CODES.begin(),CODES.end(),'p','4');
            replace(CODES.begin(),CODES.end(),'u','5');
            replace(CODES.begin(),CODES.end(),'t','6');
            replace(CODES.begin(),CODES.end(),'e','7');
            replace(CODES.begin(),CODES.end(),'r','8');
            replace(CODES.begin(),CODES.end(),'s','9');
            replace(CODES.begin(),CODES.end(),'x','0');

            cout << "Value: " << CODES << endl;

            cout << "Do you want to enter another code? (Y/N) ";
            cin >> choice;
        }
        while(strcmpi(choice, 'yes') == 0 ||strcmpi(choice, 'y') == 0 );
        {
            if (strcmpi(choice, 'no') == 0 || strcpmi(choice, 'no' == 0);
            {
            cout << "Program terminate";
            }
        }

        return 0;
    }

any help will be appreciated, thank you very much
ps. i prefer classic c++

c++ win counter

Hello, I tried to make game where you can determine the winner by inputting their scores
i'm just confuse how to count the wins of one team

here's my code:

#include <iostream>
#include <string.h>

using namespace std;
main(){

    int p1, p2, a=4;
    int wincount=0;
    string team1, team2;
    for (int j=0; j<a; j++)
    {

    cout << "GAME " << j+1 << "\n";
    cout << "Input Team 1 name: ";
    cin >> team1;
    cout << "Input Team 2 name: ";
    cin >> team2;
    for (int v=1; v<=3; v++)
        {
        cout << "Round " << v << ": " << endl;
        cout << "\tTeam " << team1 << " Points: ";
        cin >> p1;

        cout << "\tTeam " << team2 << " Points: ";
        cin >> p2;
        cout << "================================\n";

            if (p1 > p2)
                {
                    cout << "Winner: Team " << team1 << endl;
                    wincount += 1;
                }
            else if (p1 < p2)
                {
                    cout << "Winner: Team " << team2 << endl;
                    wincount += 1;
                }
            else
                {
                    cout << "No winner\n";
                }
        }
        cout << "Team " << team1 << ": " << wincount << "wins(s)" << endl;
        cout << "Team " << team2 << ": " << wincount << "wins(s)" << endl;
        cout << "Game " << j+1 << "Winner: ";
    }
    //cout << "Summary of winners: ";
    //for (int i=1; i<a; ++i)
    //{
    //  for(int v=i+1;v<a:v++)
    //  {
    //      
    //  }
    //}
}

i'm also confuse how to enlist the winners in 3 games as indicated inside the for loop, those slashes are my trial and error but no luck.

any help is appreciated
PS: I don't use, void, public, class, struggle or anything advance c++ topics