I need help with recursive sum
I don't know how to do it, I tried it but I get an error. This is the description of the problem: Write a program that takes N numbers as input and recursively calculates the sum of all numbers from 1 to N. Input example 5 Output example fifteen Explanation 5 + 4 + 3 + 2 + 1 = 15. This is code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int number = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(Sum(number)); } static int Sum(int num) { //completa el método recursivo } } }