Thanks for the tip. I couldnt get the bool function to work so i used int set to 0 or 1. Here is my code now but its just counting the "s". Am I barking up the right tree?
Originally Posted by Brokenhope
Off to find dinner. I'll check back after my belly quits complaining!
int is_count = 0;
int lastchar = 0;
printf("Key in your word or phrase: \n");
while ((ch = getchar()) !='#')
if (ch == 'i')
lastchar = 1;
if (ch == 's' && lastchar == 1)
lastchar = 0;
printf("\"is\" count %d\n", is_count);