#include <stdio.h>
#define S 10
int main() {
    int a[S],n,i,t=0;
    printf("\nEnter how many no u wanna to add:");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        t=t+a[i];
    }
    printf("\n SUM = %d",t);
    return 0;
}

Embed on website

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