#include#include void main() { int i,a[50],sum,n; printf("\n Enter no of elements :"); scanf("%d",&n); /* Reading values into Array */ printf("\n Enter the values :"); for(i=0;i 〈 n;i++) scanf("%d",&a[i]); /* computation of total */ sum=0; for(i=0;i 〈 n;i++) sum=sum+a[i]; /* printing of all elements of array */ for(i=0;i 〈 n;i++) printf("\n a[%d]=%d",i,a[i]); /* printing of total */ printf("\n sum=%d",sum); }

0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email