From 0245b141b0789cfc687f8d9a871db82ab5770981 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 18 Mar 2022 14:40:38 +0100 Subject: [PATCH] aaaa --- du3/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/du3/program.c b/du3/program.c index 2f88c1c..6b0f4e0 100644 --- a/du3/program.c +++ b/du3/program.c @@ -11,7 +11,9 @@ int main(){ for(int idx=0;1;idx++ ){ ch=getchar(); if(ch==EOF||ch==' ')break; - pol[idx]=ch; + if((ch<'9'&&ch>'0')||(ch==EOF)||(ch==' ')); + else printf("Nepodarilo sa nacitat polynom na 2 mieste.\n"); + pol[idx]=ch; } int koef=-1;