#include
int sum( int n );
int main()
{
int n;
scanf("%d", &n);
printf ("%d\n", sum(n));
return 0;
}
int sum( int n ){
if(n==0)
return 0;
else
return n+sum(n-1);
}
#include
int sum(int i,int n);
int main()
{
int i=1;
int n;
scanf("%d", &n);
printf ("%d\n", sum(i,n));
return 0;
}
int sum(int i,int n)
{
int result;
if(i
result=i+sum(i+1,n);
return result;
}
else
return n;
}
for i=1 to n
sum=sum+i
next i
print sum
int Sum(int N)
{
if(N=1)
return N;
else return Sum(N-1)+N;
}