/*Title : C Example 9 */ /*Author : John Walsh */ /*Date : 1 May 2000 */ #include #include int main( void ) { char word [20]; int timesInLoop; timesInLoop = 0; do { timesInLoop ++; printf( "Please enter a word (or END to finish) "); scanf("%s",word); } while (strcmp(word, "end") != 0 && strcmp(word, "END") != 0); printf( "Program ended\n"); printf ("The number of times in the loop is %d \n",timesInLoop); return 0; }