c2
This commit is contained in:
parent
0d75f30a49
commit
4744ebb565
69 changed files with 7 additions and 5 deletions
22
1sem/adaptation courses/05/15.cpp
Normal file
22
1sem/adaptation courses/05/15.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// ac_5_15.cpp
|
||||
// Горбацевич Андрей
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
double df(int N) {
|
||||
double out = 1.;
|
||||
double os = 0.;
|
||||
for (int i = 1; i <= N; i++) {
|
||||
os += i*i;
|
||||
out *= os;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int N;
|
||||
cout << "N >>>";
|
||||
cin >> N;
|
||||
cout.setf(ios_base::fixed);
|
||||
cout << "PS= " << df(N) << endl;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue