Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joymon/cfdda0ed1073f1249357 to your computer and use it in GitHub Desktop.
Save joymon/cfdda0ed1073f1249357 to your computer and use it in GitHub Desktop.
Simple function to find factorial
private static int FindFactorialWithSimulatedDelay(int no)
{
int result = 1;
for (int i = 1; i <= no; i++)
{
Thread.Sleep(500);
result = result * i;
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment