Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- const int MAX_SIZE = 99;
- int numbers1[MAX_SIZE]{};
- int numbers2[MAX_SIZE]{};
- int arrSize, n1, n2;
- cin >> arrSize;
- for (int i = 0; i < arrSize; i++) {
- if (i % 2 == 0) {
- cin >> numbers1[i];
- cin >> numbers2[i];
- }
- else {
- cin >> numbers2[i];
- cin >> numbers1[i];
- }
- }
- for (int i = 0; i < arrSize; i++) {
- cout << numbers1[i] << ' ';
- }
- cout << endl;
- for (int i = 0; i < arrSize; i++) {
- cout << numbers2[i] << ' ';
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement