Check if sum of first 5 numbers equals to last 5 in array

C program to read any 10 integers and check if sum of first 5-elements is equal to sum of last 5-elements or not.

Solution:

#include <stdio.h>
int main()
{
     int a[10],i,s1=0,s2=0;
     printf("Enter 10 Numbers:\n\n");
     for(i=0;i<10;i++)
     {
          scanf("%d",&a[i]);
     }
     for(i=0;i<5;i++)
     {
          s1=s1+a[i];
     }
     for(i=5;i<10;i++)
     {
          s2=s2+a[i];
     }
     printf("\nSum of First 5 Numbers: %d\n\nSum of Last 5 Numbers : %d\n",s1,s2);
     if(s1==s2)
          printf("\nSum is Equal");
     else
          printf("\nSum is NOT Equal");
     return 0;
}


Output:

sum first 5 last 5