From 50879eea8defa59fd4f8afb08be00b02e3e4172e Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 18 Mar 2022 14:56:13 +0100 Subject: [PATCH] aaaaa --- du3/program.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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");