🔒 Closed Pa help po pls using string po

Status
Not open for further replies.
wag dito sa fb pages ka humingi nang tulong mas responsive dun tsaka gawa ka muna draft bago mag pa tulong dito may service din ako sa fiverr pero mahal.
 
C++:
#include <iostream>
#include <string>
using namespace std;

int main()
{
    string input;
    char vowels[5] = { 'A', 'E', 'I', 'O', 'U' };
    char jeje[5] = {'@','^','!','*','$'};

    cout << "Input name: ";
    getline (cin, input);

    for(int i=0;i<input.length(); i++)
    {
        char c = toupper(input[i]);
        for (int j = 0; j < 5; j++)
        {
            if (c==vowels[j])
            {
                input[i] = jeje[j];
            }
        }
    }

    cout << "Encrypted name: " << input;

    return 0;
}

not sure kung gagana
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 3
    Replies
  • 398
    Views
  • 2
    Participants
Last reply from:
Iaminkwo

Online now

Members online
513
Guests online
749
Total visitors
1,262

Forum statistics

Threads
2,276,021
Posts
28,967,090
Members
1,232,052
Latest member
Gzdf
Back
Top