0
Can you help me with this code? I really don't understand where I'm wrong here
using... namespace ConsoleApp1 { class program { static int Fact(int n) { if (n ==0) { return 1;//base case } else { return n * Fact(n - 1);//recursive case } } } }
9 Answers
+ 1
You need these brackets in your main: { }
+ 1
I don't really understand the problem? What is it that isn't working exactly?
0
What problem are you facing
0
It doesn't give me the result it should give
0
Paste the complete code in code playground and share the link.
0
Still doesn't work
0
It doesn't give the right result
0
You're code was full of typos. I've modified it a little.
Take a look
https://code.sololearn.com/cNKhMdpGF23j
- 1
https://code.sololearn.com/cWSPmsLZiI4N/?ref=app