#include <iostream>
using namespace std;
int num(int n);
int main() {
int n;
cin >> n;
cout << num(n) << endl;
return 0;
}
int num(int n) {
if (n == 0 || n == 1) {
return 1;
}
return n + num(n - 1);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: