Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 1 other subscriber
int fun(int n)
int i, j, sum = 0;
for(i = 1;i<=n;i++)
Explanation: fun(n) calculates sum of first n integers or we can say it returns n(n+1)/2.