Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n = 0;
- int comp=0;
- cout << "Данная программа позволяет найти P=2*4*6*8..*2*n " << endl;
- setlocale(LC_ALL, "Russian");
- cout << "Введите чило n " << endl;
- cin >> n;
- if ((n < 1) || (n > 9)) {
- cout << "Введите чило в диапозоне от 1 до 9";
- }
- for (int i = 2; i < (2 * n + 1); i++) {
- if (i % 2 == 0) {
- comp = comp * i;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement