Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
449 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    int a;
    cin >> a;
    int mass1[100];
    int mass2[100];
    int sum[100];

    for (int i = 0; i < a; i++) {
        cin >> mass1[i];
    }

    for (int i = 0; i < a; i++) {
        cin >> mass2[i];
    }

    for (int i = 0; i < a; i++) {
        sum[i] = mass1[i] + mass2[i];
    }

    for (int i = 0; i < a; i++) {
        cout << sum[i] << " ";
    }
}
Leave a Comment