From 8eebd7c7f3ce3ca9edde1307b2fc9f02519c7388 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 19 Mar 2020 13:29:32 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'a1/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/a1/program.c b/a1/program.c index aecaca0..7492aa2 100644 --- a/a1/program.c +++ b/a1/program.c @@ -4,10 +4,14 @@ int main() { - int i,c; + int i,c,no; double x; long double result=0; scanf("%lF",&x); + if(scanf("%lF",&x)!=1){ + printf("Nepodarilo sa nacitat x\n"); + no=1; + } long double *array; array = (long double*) malloc(10000); for(i=0,c=1;i