This commit is contained in:
Oleksandr Vyshniakov 2025-02-22 14:57:36 +01:00
parent fca056ad0a
commit 79a9d2bdd6

View File

@ -23,6 +23,29 @@ double hornerovaschema (double x, double cofecients[], int count) { //вычес
}
int main() {
double x;
double cof[maxcoe];
double count = 0;
printf("Zadajte x: ");
if (!read_number(&x)) { //если не может считать
printf("Chyba. Nepodarilo sa nacitat hodnotu");
return 1;
}
printf("Zadajte koeficienty (po jednom na riadok, ukoncite prazdnym riadkom):\n");
while (count < maxcoe)
double coef; //переменна для хранения считанного коэффициента
char buffer[50];//строковый буфер для fgetc
if (!fgetc(buffer, sizeof(buffer), stdin) || buffer[0] == '\n') {
break;
}
return 0;
}