Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <vector>
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- double a[100];
- int n;
- cin >> n;
- for (int i = 0; i < n; i++) {
- cin >> a[i];
- }
- double c[100][100];
- for (int i = 0; i < n; i++) {
- int t = 0;
- for (int j = i; j < n; j++) {
- c[i][t] = a[j];
- t++;
- }
- for (int j = 0; j < i; j++) {
- c[i][t] = a[j];
- t++;
- }
- }
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- cout << c[i][j] << ' ';
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement