Last active
January 26, 2019 23:51
-
-
Save invatainfo/29c40874ac9a68d96d4c5ae9cf890301 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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