#include <iostream>
using namespace std;
int main() {
long int p,s;
int i,j,n;
s = 0;
cout << "Введите n: " << endl;
cin >> n;
for(i = 1; i<=n;i++){
p = 1;
for(j = i; j<=2*i;j++){
p*=j;
}
s+=p;
cout << "Сумма равна " << s << endl;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main() {
long int p,s;
int i,j,n;
s = 0;
cout << "Введите n: " << endl;
cin >> n;
for(i = 1; i<=n;i++){
p = 1;
for(j = i; j<=2*i;j++){
p*=j;
}
s+=p;
}
cout << "Сумма равна " << s << endl;
}