From 46c2ad59ad3efc9e82683057335ddbcb492304b8 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Fri, 3 Apr 2020 00:11:45 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu4/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du4/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index f008d89..a887dc8 100644 --- a/du4/program.c +++ b/du4/program.c @@ -39,10 +39,10 @@ double a,b,c; char ac,el=0; int count=0; int eof; +int ro=0; for(;eof!=EOF;count++){ eof=0; int k=0; - int ro=0; str=(char*)malloc(100); int ind=0; for(int i=0;eof!='\n';i++){ @@ -63,6 +63,7 @@ for(;eof!=EOF;count++){ result[count]=3; break; } + ro=0; if(eof==EOF) break; sscanf(str,"%lF%c%lF=%lF ",&a,&ac,&b,&c); free(str);