Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
442 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main() {
	int mas1[100], mas2[100], mas3[100],A;
	cin >> A;
	cout << "vvedi mas1:" << "\n";
	for (int i = 0; i < A; i++) {
		cin >> mas1[i];
	}
	cout << "vvedi mas2:" << "\n";
	for (int i = 0; i < A; i++) {
		cin >> mas2[i];
	}
	for (int i = 0; i < A; i++) {
		mas3[i] = mas1[i] + mas2[i];
	}
	cout << "otvet:";
	for (int i = 0; i < A; i++) {
		cout << mas3[i] << " ";
	}
}
Leave a Comment