Here I go again...arrays....char...
My code is here! Vowels from sentence in one array, all none vowels in other array. First one is working but I can't get it to put all others in other array! Help!
Code:
int main()
{
int sranje;
char niz[100];
char niz2[100]={NULL};
char niz4[100]={NULL};
char niz3[]={'a','A','e','E','U','u','i','I','o','O'};
int a,b,c=0,d=0,br=0;
printf("Upisi niz: ");
fgets(niz, sizeof(niz), stdin);
for(a=0;a<strlen(niz)+1;a++)
{
if(niz[a]==' ')
br++;
for(b=0;b<strlen(niz3)+1;b++)
{
if(niz[a]==niz3[b])
{
niz2[c]=niz[a];
c++;
}
}
}
puts(niz2);
printf("\n");
puts(niz4);
printf("\n%d", br);
scanf("%d", &sranje);
}
I tried with combinations like this,
Code:
f(niz[a]!=niz3[b])
{
niz4[d]=niz[a];
d++;
}
but, nothing.