Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <string>
- #include <iostream>
- #include <Windows.h>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- //int perestanovka(int m, int n)
- //{
- // int i, h;
- // if (i == m)
- // {
- // h = 1;
- // }
- //
- //}
- int main()
- {
- int n = 10, i, m=0, f = 1, h = 1;
- int *o = new int[n];
- int *r = new int[n];
- while (h <= n)
- {
- o[h] = h;
- r[h] = o[h];
- h++;
- }
- i = n;
- h = 1;
- while (h <= n)
- {
- f = f * h;
- h++;
- }
- h = 0;
- while (m < (n - 1))
- {
- while (i > 2)
- {
- swap(o[i], o[i - 1]);
- i--;
- }
- cout << "o[" << 10 << "]" << o[10] << endl;
- i = n;
- m++;
- }
- //while (h<f)
- //{
- //
- //}
- //cout << f;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement