diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..8f17665 --- /dev/null +++ b/main.cpp @@ -0,0 +1,34 @@ +#include +#include "newton/Newton.cpp" +#include "horner/horner_class.cpp" + +int main() +{ + // Schemat hornera test part + + float x = 0; + Wielomian wielomian; + cout << "Program do obliczenia wielomianu schematem hornera\n"; + + cout << "Podaj x dla ktorego szukamy rozwiazania: "; + cin >> x; + wielomian.readFromFile("dane.txt"); + wielomian.setX(x); + wielomian.oblicz(); + wielomian.wyswietl_wynik(); + wielomian.reverse_a(); + + cout << "\nWynik rekurencyjny: " << wielomian.oblicz_rekurencyjnie(wielomian.getStopien() - 1) << endl; + + + + + // Newton test part + + Newton first; + first.readFromFile("input.txt"); + // first.wyswietl_x_y(); + first.wyswietl_tabela(); + + return 0; +} \ No newline at end of file diff --git a/newton/main.cpp b/newton/Newton.cpp similarity index 90% rename from newton/main.cpp rename to newton/Newton.cpp index 9641500..13ce055 100644 --- a/newton/main.cpp +++ b/newton/Newton.cpp @@ -54,16 +54,9 @@ public: } } + + private: float a, b; vector x ,y; -}; - -int main() -{ - Newton first; - first.readFromFile("input.txt"); - // first.wyswietl_x_y(); - first.wyswietl_tabela(); - return 0; -} \ No newline at end of file +}; \ No newline at end of file