What is wrong | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is wrong

using System; using System.Collections.Generic; namespace SoloLearn { class Program { static void Main(string[] args) { int levels = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(Points(levels)); } static int Points(int levels) { //your code god here if (levels == 0);{ return 0 ; } else { return levels + Points (levels - 1); } } } }

14th Sep 2021, 10:44 AM
yoel
2 Answers
+ 5
if (levels == 0) { Delete the semicolon here!
14th Sep 2021, 10:46 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Tanks
14th Sep 2021, 11:21 AM
yoel