1 solutions
-
1
#include <bits/stdc++.h> using namespace std;
int main() { int a[6] = {0, 1, 2, 3, 4, 5}; cout << "1: " ; for (int i = 1; i <= 5; i++) { cout << a[i] << " "; } cout<<endl;
for (int i = 2; i <= 10; i++) { int d = a[1]; for (int j = 1; j < 5; j++) { a[j] = a[j + 1]; } a[5] = d; cout << i << ": "; for (int j = 1; j <= 5; j++) { cout << a[j] << " "; } cout << endl; } return 0;
}
Information
- ID
- 344
- Time
- 1000ms
- Memory
- 64MiB
- Difficulty
- 4
- Tags
- # Submissions
- 86
- Accepted
- 42
- Uploaded By