Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void printline();
- void Addition(int c[], int n);
- int main()
- {
- int a[]={4,2,6,-7,10};
- Addition(a,5);
- }
- void Addition(int c[], int n)
- {
- int i, s=0;
- for(i=0;i<n;i++)
- s=s+c[i];
- printline();
- printf("%d",s);
- printline();
- }
- void printline()
- {
- printf("\n+++++++\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement