I'm doing a program that counts how many vowels there are in the word, I was able to do it, now I was trying to do just count a vowel in the word, for example Rafael, the appears 2 times, I want you to count only once, could you help me ?
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv)
{
char nome[100];
char vogais[11]={"AEIOUaeiou"};
int cont=0;
scanf("%s",nome);
for(int i=0;i<strlen(nome);i++)
{
for(int j=0;j<strlen(vogais);j++)
{
if(nome[i]==vogais[j])
{
cont++;
}
}
}
printf("%d\n",cont);
return 0;
}