You need to make a loop and vary the index by the loop variable.
I made an example with 6 numbers, but just change to 100 in the second line. Do not put an odd value that will give problem.
I started the vectors zeroing them, made a loop to read all items, then made the sum loop and finally the loop showing the result.
In the sum loop I created each element of the second vector by summing the equivalent elements according to the formula apparently requested in the question (it is not easy to do something without a formula definition, but I am confident that this is what you want).
For an exercise I think it’s good like this.
#include <stdio.h>
#define MAX 6
int main(void) {
int vet1[MAX];
int vet2[MAX / 2];
for (int i = 0; i < MAX; i++) scanf("%d", &vet1[i]);
for (int i = 0; i < MAX / 2; i++) vet2[i] = vet1[i * 2] + vet1[i * 2 + 1];
for (int i = 0; i < MAX / 2; i++) printf("%d\n", vet2[i]);
}
Behold working in the ideone. And in the repl it.. Also put on the Github for future reference.
This vector is tiny. It would need more information. It would be good to put your code in the question and tell you where you are having trouble. But any size makes no sense to do one by one.
– Maniero