diff --git a/du3/program.c b/du3/program.c index 14a307a..ae7e86d 100644 --- a/du3/program.c +++ b/du3/program.c @@ -13,8 +13,13 @@ int main(){ if(ch==EOF||ch==' ')break; pol[idx]=ch; } - for(int i=0, p=0;i='0')||(pol[i]=='.')||(pol[i]==EOF)||(pol[i]==' ')); + else { + printf("Nepodarilo sa nacitat polynom na %d mieste.\n", p); + return 0; + } else if((pol[i]<='9'&&pol[i]>='0')||(pol[i]=='.')||(pol[i]==EOF)||(pol[i]==' ')); else { printf("Nepodarilo sa nacitat polynom na 2 mieste.\n");