#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Faça um algoritmo que leia uma string e remova as vogais e os espaços em
branco. */
int main(int argc, char *argv[])
{
char str[1000], newstr[1000];
int i = 0, x=0;
printf ("Insira uma string:\n"); while (str[i] != '\0')
{
if (str[i] == 'a'||str[i] == 'e'||str[i] == 'i'||str[i] == 'o'||str[i]== 'u' || str[i] == 'A'|| str[i] == 'E'|| str[i] == 'I'|| str[i] =='O'|| str[i] == 'U')
{
i++;
continue;
}
else
{
if (str[i] != ' ')
{
newstr[x++] = str [i];
}
}
i++;
}
newstr[x]='\0';
printf ("String sem vogais:\n"); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgovKiBGYcOnYSB1bSBhbGdvcml0bW8gcXVlIGxlaWEgdW1hIHN0cmluZyBlIHJlbW92YSBhcyB2b2dhaXMgZSBvcyBlc3Bhw6dvcyBlbQpicmFuY28uICovCgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CiAgICBzeXN0ZW0gKCJjb2xvciAwYSIpOwogICAgY2hhciBzdHJbMTAwMF0sIG5ld3N0clsxMDAwXTsKICAgIGludCBpID0gMCwgeD0wOwogICAgcHJpbnRmICgiSW5zaXJhIHVtYSBzdHJpbmc6XG4iKTsKICAgIGZnZXRzKHN0ciwgOTk5LCBzdGRpbik7CiAgICB3aGlsZSAoc3RyW2ldICE9ICdcMCcpCiAgICB7CiAgICAgICAgaWYgKHN0cltpXSA9PSAnYSd8fHN0cltpXSA9PSAnZSd8fHN0cltpXSA9PSAnaSd8fHN0cltpXSA9PSAnbyd8fHN0cltpXT09ICd1JyB8fCBzdHJbaV0gPT0gJ0EnfHwgc3RyW2ldID09ICdFJ3x8IHN0cltpXSA9PSAnSSd8fCBzdHJbaV0gPT0nTyd8fCBzdHJbaV0gPT0gJ1UnKQogICAgICAgIHsKICAgICAgICAgICAgaSsrOwogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgaWYgKHN0cltpXSAhPSAnICcpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIG5ld3N0clt4KytdID0gc3RyIFtpXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpKys7CiAgICB9CiAgICBuZXdzdHJbeF09J1wwJzsKICAgIHByaW50ZiAoIlN0cmluZyBzZW0gdm9nYWlzOlxuIik7CiAgICBwdXRzIChuZXdzdHIpOwogICAgc3lzdGVtICgicGF1c2UiKTsKICAgIHJldHVybiAwOwp9Cg==