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;