+ 1

Can any one explain me how 720 ?

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static int Fact(int num) { if (num == 1) { return 1; } return num * Fact(num - 1); } static void Main(string[] args) { Console.WriteLine(Fact(6)); } } }

7th Feb 2020, 8:01 PM
Ehsan Wattoo
3 Answers
+ 7
it is an example of using recursion, when a function calls itself, to calculate the factorial of a number. what it does basically is : 6x5x4x3x2x1 = 720
7th Feb 2020, 8:10 PM
Bahha┣
Bahha┣ - avatar
+ 3
It's a math question: 6!=720
7th Feb 2020, 11:34 PM
Sonic
Sonic - avatar
+ 2
bahha🐧 thankssss bro
7th Feb 2020, 8:24 PM
Ehsan Wattoo