Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Created September 16, 2017 15:00
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/1edea26736e8fe6d6e320dd25f4ba36c to your computer and use it in GitHub Desktop.
Save invatainfo/1edea26736e8fe6d6e320dd25f4ba36c to your computer and use it in GitHub Desktop.
#include <iostream.h>
#include <string.h>
void main() {
char s[255];
cin.get(s, 255);
char v[] = " aeiou";
int gata = 0, i;
i = strlen(s) - 1;
while (!gata) // ca sa stearga o singura data
{
if (strchr(v, s[i]) == 0) {
strcpy(s + i, s + i + 1);
gata = 1;
}
i--;
}
cout << s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment