#include <stdio.h>
int main()
{
printf("To stop enter '.'\n\n");
int counter = 0;
char ch;
do
{
scanf("%c", &ch);
counter++;
printf("counter = %i\n", counter);
} while (ch != '.');
return 0;
}