#include int main () { char c; int stanje = 0; int prelaz[6][3] = {{1, 2, -1}, {-1, 3, -1}, {-1, -1, 4}, {-1, 5, 4}, {-1, -1, -1}, {-1, 5, 4}}; while ((c=getchar())!=EOF && c!='\n') { if (c!='a' && c!='b' && c!='c') { printf("Greska:%c.\n",c); return -1; } stanje = prelaz[stanje][c-'a']; if (stanje == -1) break; } if (stanje==4) printf("Prepoznata.\n"); else printf("Nije prepoznata.\n"); return 0; }