Sum of Natural Numbers

Easy

📝 Description

Calculate sum of first n natural numbers using recursion

Input Format

Integer n

Output Format

Sum of numbers

Constraints

1 ≤ n ≤ 1000

🔍 Sample Input

5
            

✅ Sample Output

15
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run