#include <iostream>
using namespace std;
int row(int n, int x);
int main()
{
int n,x;
cout << "Input number: ";
cin >> n;
cout << "Input x: ";
cin >> x;
if (n == 0) {cout << 1;return 0;}
while (n < 0)
{
cout << "Error! Type n > 0!";
cin >> n;
}
cout << row(n, x);
return 0;
}
int row(int n, int x)
{
int s;
if (n==0) return 1;
if (n==1) return x;
if (n==n) {
s = ((2*n-1)*x*row(n-1,x)-row(n-2,x));
}
return s;
}
Вот мой код. Скажите пожалуйста, что с ним не так? P.S. Он что-то выводит, но я не понимаю, выводит то, что требуется, или же нет