From 9006ab5b4e4ae1de4bc3f5d155349c659e1246dd Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Thu, 2 Apr 2020 15:51:05 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du4/program.c b/du4/program.c index b2017f5..54aa8cb 100644 --- a/du4/program.c +++ b/du4/program.c @@ -3,9 +3,9 @@ int main(){ char read[1000000]; scanf("%[^\n]", read); - int num1, num2, answer; + float num1, num2, answer; char action; - sscanf(read, "%d %c %d %*c %d", &num1, &action, &num2, &answer); + sscanf(read, "%f %c %f %*c %f", &num1, &action, &num2, &answer); if(action != '/' && action != '*' && action != '-' && action != '+'){ printf("CHYBA\n"); return -1;