Beginner C
I am trying to extract "aeiou" vowels from line that the user input
ex: user input: dghrywei
I want to write a program that can print only the vowels
This is what I have so far...can't get it to work!!!
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
int main(void)
{
char line[80];
char string[80];
char vowels[80];
char consonates[80];
int k;
k=0;
printf("Input characters: ");
gets(line);
strcpy(string, line);
while (strlen(string[k]))
if (string[k]=='a'||'e'||'i'||'o'||'u') printf("%d\n", k);
return 0;
}