Tuesday, September 8, 2009

COUNT THE NUMBER OF OCCURRENCES OF ANY TWO VOWELS IN SUCCESSION IN A LINE OF TEXT USING C

#include int isvowel(char chk);int main(){ char text[1000], chk; int count; count = 0; while( (text[count] = getchar()) != '\n' ) count++; text[count] = '\0'; count = 0; while ( (chk = text[count]) != '\0' ) { if ( isvowel(chk) ) { if ( (chk = text[++count]) && isvowel(chk) ) {

No comments:

Post a Comment