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++

An Excel Macro Do Until Question – until specific info in a specific cell

Hi, first, let me say this seems the best site I have come across for some great education and discussions... much appreciated! I am now to VBA and have a macro that I want to run until I get a particular message "#VALUE!" in a particular cell "B2". So far saw lots of Do Until loop with various options, have played with different ideas, but nothing working. My current code goes through 194 loop because that is the extent of data I have on another worksheet, but want to trigger the do until to stop not at a certain amount of loops but when last row, which generates the #VALUE! so that should be the cue to stop. Any input great appreciated. Thanks, Paul

Here is my current code:

Sub RunShoes1()
'
' RunShoes1 Macro
'
' Keyboard Shortcut: Ctrl+r
'
Dim i As Integer
i = 0
Do Until i = 196
i = i + 1
Range("A4").Select
ActiveCell.FormulaR1C1 = i + 1
Range("A2:J2").Select
Selection.Copy
Range("A13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Loop

End Sub