#include #define P 0 #define N 1 int main () { char c; int stanje = P; while ((c=getchar())!=EOF && c!='\n') { if (c!='0' && c!='1') { printf("Greska:%c.\n",c); return -1; } switch(stanje) { case P: if (c=='0') stanje = N; else stanje = P; break; case N: if (c=='0') stanje = P; else stanje = N; } } if (stanje==P) printf("PARAN.\n"); else printf("NEPARAN.\n"); return 0; }