Обновить du2/program.c

This commit is contained in:
Bohdana Marchenko 2025-03-06 11:01:43 +00:00
parent 563a7af4f2
commit 62b5936b83

View File

@ -34,15 +34,15 @@ int main() {
double coef; double coef;
double result = 0; double result = 0;
int coef_count = 0; int coef_count = 2;
while (1) { while (1) {
int status = read_double(&coef, coef_count + 2); int status = read_double(&coef, coef_count);
if (status == -1) { if (status == -1) {
return 0; return 0;
} }
if (status == 0) { if (status == 0) {
if (coef_count == 0) { if (coef_count == 2) {
return 1; return 1;
} }
break; break;