Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Last active January 26, 2019 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save invatainfo/29c40874ac9a68d96d4c5ae9cf890301 to your computer and use it in GitHub Desktop.
Save invatainfo/29c40874ac9a68d96d4c5ae9cf890301 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string.h>
using namespace std;
int main() {
char s[40];
cin >> s;
char v[] = "aeiou";
for (int i = 0; i < strlen(s); i++)
if (strchr(v, s[i]) != 0) // e vocala mica
{
char aux[40];
strcpy(aux, s + i);
strcpy(s + i + 1, aux); // dubleaza vocala mica
s[i + 1] = s[i + 1] - 32; // transforma dublura in mare
}
cout << s << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment