Деление массивов

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <vector> using namespace std; class poly{ private: vector<int> koef; public: int st; // степень void write () { for(int i = 0; i<st+1; i++){ int a; cin >> a; koef.push_back(a); } } void poly_output(){ for(int s = 0; s < st+1; s++){ cout << koef.at(s) << " "; } } int get_element(int d){ return koef.at(d); } void set_element(int r, int k){ koef.at(r) = k; } }; int main(){ poly poly1; poly poly2; poly answer; cout << "Введите степень первого массива: "; cin >> poly1.st; cout << "введите коефициенты первого массива "; poly1.write(); cout << "Введите степень второго массива: "; cin >> poly2.st; cout << "введите коефициенты второго массива "; poly2.write(); }
Editor Settings
Theme
Key bindings
Full width
Lines