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 } } } }

14th Aug 2017, 8:31 AM
Sara
9 Answers
+ 1
You need these brackets in your main: { }
14th Aug 2017, 9:19 AM
Bagshot
Bagshot - avatar
+ 1
I don't really understand the problem? What is it that isn't working exactly?
14th Aug 2017, 9:27 AM
Bagshot
Bagshot - avatar
0
What problem are you facing
14th Aug 2017, 9:04 AM
Salekin
Salekin - avatar
0
It doesn't give me the result it should give
14th Aug 2017, 9:05 AM
Sara
0
Paste the complete code in code playground and share the link.
14th Aug 2017, 9:07 AM
Salekin
Salekin - avatar
0
Still doesn't work
14th Aug 2017, 9:20 AM
Sara
0
It doesn't give the right result
14th Aug 2017, 9:30 AM
Sara
0
You're code was full of typos. I've modified it a little. Take a look https://code.sololearn.com/cNKhMdpGF23j
14th Aug 2017, 9:32 AM
Salekin
Salekin - avatar
- 1
https://code.sololearn.com/cWSPmsLZiI4N/?ref=app
14th Aug 2017, 9:11 AM
Sara