#include <stdio.h>
#define S 10
int main() {
    int a[S],i,n,sume=0,sumo=0;
    printf("\nEter how many no u want in array:");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n;i++)
    {
        if(a[i]%2==0)
        sume=sume+a[i];
        else
        sumo=sumo+a[i];
    }
    printf("\n Sum of even = %d & Sum of odd = %d",sume,sumo);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: