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;