All pastes #709830 Raw Edit

Anonymous

public text v1 · immutable
#709830 ·published 2007-09-25 00:33 UTC
rendered paste body
#include <iostream>
#include <string>

using namespace std;

int Translator(int Choice);

int main()
{
    int Choice;
    string Leet;
    int Outcome;
    
    cout << "Hello. What would you like to do: ";
    cout << "\n1 - Normal to leet\n";
    cout << "2 - leet to Normal\n";
    cin >> Choice;
    
    Outcome = Translator(Choice);
int x;
cin >> x;
return 0;
}

int Translator(int Choice)
{
    int LorN;
    string Leet;
    switch(Choice)
    {
                  case 1:
                       cout << "What is your sentence?: ";
                       cin >> Leet;
                       LorN = 1;
                       break;
                  case 2:
                       cout << "What is your sentence?: ";
                       cin >> Leet;
                       LorN = 2;
                       break;
                  default:
                          cout << "this isnt an option please choose again.";
}

if (LorN == 1)
{
         for (int x = 0; x < 10; x++)
         {
             if(Leet.find_first_of("e") == string::npos)
             {
                                        cout << "no e's....";
                                        }
             else
             {
                 Leet.replace(Leet.find_first_of("e"), 0, "3");
             } 
           





}
}
else
{
     if (LorN == 2)
     {
              cout << "ok in a sec.";
              }
}

cout << Leet;

}