<span>средствам оперативной полиграфии</span>
#include <iostream>
#include <cmath>
using namespace std;
//Функция вычисления факториала
long double fact(int N) {
if(N < 0)
return 0;
if (N == 0)
return 1;
else
return N * fact(N - 1);
}
int main() {
int k;
double x, S;
cout << "k = "; cin >> k;
cout << "x = "; cin >> x;
for (int n = 1; n <= k; n++)
S += (pow(-1,(n+1)) * pow(x,(2*n-1)))/fact(2*n-1);
cout << "S = " << S << endl;
system("pause");
return 0;
}
Hex(8): 4 = Dec(10)
Hex: 1,2,3,4,5,6,7,10,11,12...
Dec: 1,2,3,4,5,6,7, 8, 9, 10...