#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char nome[100]="Celular";
char letra;
int qtd=0;
int i, j;
printf("Nome definido: %s\n\n", nome
);
printf("\nCARACTER que deseja INCLUIR no nome ");
printf("\nQuantidade de vezes que deseja colocar no nome? ");
for( i
=strlen(nome
) ; i
>-1;i
--){
if(nome[i]=='a' || nome[i]=='e' || nome[i]=='i' || nome[i]=='o' || nome[i]=='u' )
{
i++;
break;
}
}
for( j
=strlen(nome
); j
>=i
; j
--) {
nome[j+qtd]=nome[j];
}
for(j=i; j<qtd+i; j++)
nome[j]=letra;
printf("resultado = %s\n ", nome
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKaW50IG1haW4oKXsKCmNoYXIgbm9tZVsxMDBdPSJDZWx1bGFyIjsKY2hhciBsZXRyYTsKaW50IHF0ZD0wOwppbnQgaSwgajsKcHJpbnRmKCJOb21lIGRlZmluaWRvOiAlc1xuXG4iLCBub21lKTsKCnByaW50ZigiXG5DQVJBQ1RFUiBxdWUgZGVzZWphIElOQ0xVSVIgbm8gbm9tZSAiKTsKc2NhbmYoIiAlYyIsJmxldHJhKTsKCnByaW50ZigiXG5RdWFudGlkYWRlIGRlIHZlemVzIHF1ZSBkZXNlamEgY29sb2NhciBubyBub21lPyAiKTsKc2NhbmYoIiAlZCIsJnF0ZCk7Cgpmb3IoIGk9c3RybGVuKG5vbWUpIDsgaT4tMTtpLS0pewoKICAgIGlmKG5vbWVbaV09PSdhJyB8fCBub21lW2ldPT0nZScgfHwgbm9tZVtpXT09J2knIHx8IG5vbWVbaV09PSdvJyB8fCBub21lW2ldPT0ndScgKQogICAgewogICAgICAgIGkrKzsKICAgICAgICBicmVhazsKICAgIH0KCn0KCmZvciggaj1zdHJsZW4obm9tZSk7IGo+PWk7IGotLSkKewogICAgbm9tZVtqK3F0ZF09bm9tZVtqXTsKfQoKZm9yKGo9aTsgajxxdGQraTsgaisrKQogICAgbm9tZVtqXT1sZXRyYTsKCnByaW50ZigicmVzdWx0YWRvID0gJXNcbiAiLCBub21lKTsKCnN5c3RlbSgiUEFVU0UiKTsKcmV0dXJuIDA7Cgp9Cg==