Count Operations
Count Operations
h>
int main()
{
int count=0,sum=0,n,i,a[50];
count=count+1;
printf("\n enter the value:");
scanf("%d",&n);
printf("\n enter the %d values to sum::",n);
for(i=0;i<n;i++)
{
count=count+1;
scanf("%d",&a[i]);
}
count=count+1;
for(i=0;i<n;i++)
{
count=count+1;
sum=sum+a[i];
count=count+1;
}
count=count+1;
printf("\n the sum of %d values is:%d ",n,sum );
printf("\ncount is:%d",count );
return 0;