#include <stdio.h>
int main (void) {
int i,sum=0;
int fun(void);
scanf("%i",&i);
for(i--;i>=0;i--)
sum+=fun();
printf("sum=%i\n",sum);
return 0;
}
int fun(void) {
static int sum=1;
return sum++;
}
#include <stdio.h>
main ()
{
int n;
for(int i=0;;i++)
{ int j,sum=0; printf("Please enter n : "); scanf("%d",&n); while (n>=1) { sum=(1+n)*n/2; printf("sum : %d\n",sum); break; }