As an example loop computer programming language, find and accumulate virtually all mainstream programming language, understanding and solving the accumulation process to grasp the essence of the loop has an important role. The most common examples are seeking and seeking accumulation and 1 to 100.
int Sum(int n)
{
int i=1,sum=0;
while(i<=n)
{
sum=sum+i;
i++;
}
return sum;
}