Help me in solving DSAAGP50 problem

My issue

what to do in this code

My code

#include <stdio.h>

int main() {
	int a[100],n,i;
	printf("enter the no of elments in the array\n");
	scanf("%d",&n);
	printf("enter the elments of the array\n");
	for(i=0;i<n;i++){
	scanf("%d",&a[i]);
	    int sum=0;
	    sum=sum+a[i];
	    printf("%d",sum);
	}
    
}


Learning course: BCS301: Data structures
Problem Link: https://www.codechef.com/learn/course/abesit-dsa/ABESITDS06/problems/DSAAGP50

Bro tu har bar array ka input leke sum 0 ker de raha he and total sum end me print karana he loop se bahar