Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
475 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main() 
{
    int A;
    int mass1[100];
    int mass2[100];
    int sumMass[100];
    cin >> A;
    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++) 
    {
        sumMass[i] = mass1[i] + mass2[i];
    }
    for (int i = 0; i < A; i++)
        cout << sumMass[i] << " ";
    return 0;
}
Leave a Comment