#include #include main() { char s[50]; int length=0; char *p; fgets(s,47,stdin); printf("%s",s); p=s; while ( !( ( *(p) == 'Z') && (*(p+1) == 'Z') ) ) { length++; // printf("%c %c %d\n", *p, *(p+1), p); p++; } printf("%d\n",length); }