Website Summary Files Commits Branches @commit @diff @stats
path: root / Week07 / Exercise12.cpp
blob: 9fdfd05c779b1948f9c0fe2d85805ef6ff0fe555 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>

void incArr(int* arr, unsigned int size) {
	for (unsigned int i = 0; i < size; i++)
		arr[i]++;
}

int main() {
	const unsigned int SIZE1 = 10, SIZE2 = 9;
	int series1[SIZE1], series2[SIZE2];

	for (unsigned int i = 0; i < SIZE1; i++)
		std::cin >> series1[i];
	for (unsigned int i = 0; i < SIZE2; i++)
		std::cin >> series2[i];

	incArr(series1, SIZE1);
	incArr(series2, SIZE2);

	for (unsigned int i = 0; i < SIZE1; i++)
		std::cout << series1[i] << ' ';
	std::cout << std::endl;

	for (unsigned int i = 0; i < SIZE2; i++)
		std::cout << series2[i] << ' ';
	std::cout << std::endl;

	return 0;
}