#include <stdio.h>
int main () 
{
  int result = sum(10);
  printf ("%d", result);
  return 0;
}
int sum (int k) {
  if (k > 0) {
    return k + sum (k - 1);
  } 
else 
{
    return 0;
  }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: