From da65046510fac444c291669fa6d5ce87358c78da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=A9re=C5=A1?= Date: Tue, 29 Oct 2019 13:24:52 +0000 Subject: [PATCH] Aktualizovat "program.c --- program.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program.c b/program.c index de0abc5..0edd89c 100644 --- a/program.c +++ b/program.c @@ -1,7 +1,7 @@ #include #include #include - +#include int main() { char* prve_cislo = malloc(100* sizeof(char)); char* druhe_cislo = malloc(100* sizeof(char)); @@ -13,10 +13,10 @@ int main() { return 0; } - int cislo1 = strtof(prve_cislo,NULL); + int cislo1 = strtof(strtok(prve_cislo,"\n"),NULL); int cislo2; while((fgets(druhe_cislo,100,stdin))){ - cislo2= strtof(druhe_cislo,NULL); + cislo2= strtof(strtok(druhe_cislo,"\n"),NULL); while (cislo1 != cislo2){ if (cislo1 > cislo2){ cislo1 -= cislo2;