Problem2223--C Programming Resit: Array2

2223: C Programming Resit: Array2

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

Write a C program that defines two integer arrays with the same size 6, and inputs all the elements (values) through the keyboard. The program defines a third integer array whose elements are computed by adding the corresponding elements of the first two arrays. The program prints the elements whose subscript is odd (i.e., 1, 3, 5) and the sum of these elements.

Input

6 integers of the first array 6 integers of the second array

Output

Odd elements of the third array computed by adding the first two arrays and the sum

Sample Input Copy

0 1 2 3 4 5
1 1 1 1 1 1

Sample Output Copy

2 4 6 12

Source/Category

267