Created
June 24, 2015 15:51
-
-
Save joymon/cfdda0ed1073f1249357 to your computer and use it in GitHub Desktop.
Simple function to find factorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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