I'm having problem in the dry run of a program.. I'm not getting why my program is giving 0 in the output.. please help.. here is my code.. :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Task_8_Set_III
{
class Program
{
static void Main(string[] args)
{
int i = 3;
int c = i / fact(i);
Console.WriteLine("Factorial is : " + c);
Console.ReadLine();
}
static int fact(int value)
{
if (value ==1)
{
return 1;
}
else
{
return (value * (fact(value - 1)));
}
}
}
}