Код: Выделить всё
#include
class lagrange {
int i, j, g, c, n;
float x[5] = {0.27, 0.93, 1.46, 2.11, 2.87};
float func[5] = {2.60, 2.43, 2.06, 0.25, -2.60};
float Elagrange, inputX, polynomL[5], multiplyL[5];
public:
lagrange(float p_inputX, int p_n) { inputX = p_inputX; n = p_n; }
void calculate() {
for(i = 0; i < n; ++i) {
for(j = 0; j < n; j++) {
if (i != j) {
multiplyL[j] = (inputX - x[j]) / (x[i] - x[j]);
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78355572/proper-way-of-using-pointers[/url]