i have written the following code and input 2,2,5 but i didn’t get the second test case
i am getting only the first one sum=5, but not sum=8
#include <stdio.h>
int main(void) {
int t,sum=0;
scanf("%d",&t);
int n[t];
for(int i = 0; i < t; ++i) {
scanf("%d", &n[i]);
}
for(int i = 0; i < t; ++i) {
sum = 3+n[i];
printf(“sum=%d”,sum );
return 0;
}
return 0;
}