From 79a9d2bdd6d247d49db57ca54abbf6cd4db877ed Mon Sep 17 00:00:00 2001 From: ov075wu Date: Sat, 22 Feb 2025 14:57:36 +0100 Subject: [PATCH] refresh --- du2/program.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/du2/program.c b/du2/program.c index 81cdc7f..57479c7 100644 --- a/du2/program.c +++ b/du2/program.c @@ -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; } \ No newline at end of file