Feed Headline Animator

Problem 6

main()
{
int l[10] ,I ,j, s;
for(i=0; < 10 ;i++)
{
printf(“Enter a number \n”);
scanf(“%d”,&l[i]);
s= summation (&l[0]);
printf(“sum=%d\n”,s);
}
summation (int *p)
{
int j,sum=0;
for(i=0 ;j<10 ;j++)
sum +=*(p+j);
return( sum);
}


Posted by: Wasim Javed

No comments:

Post a Comment