Changed not much
This commit is contained in:
@@ -8,11 +8,11 @@ namespace Factorial {
|
|||||||
bool exit = false;
|
bool exit = false;
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
bool correct = false;
|
bool correct = false;
|
||||||
int find = 0;
|
BigInteger find = 0;
|
||||||
while (!correct) {
|
while (!correct) {
|
||||||
try {
|
try {
|
||||||
Console.Write("Enter a number to find the factorial of: ");
|
Console.Write("Enter a number to find the factorial of: ");
|
||||||
find = int.Parse(Console.ReadLine());
|
find = BigInteger.Parse(Console.ReadLine());
|
||||||
correct = true;
|
correct = true;
|
||||||
} catch {
|
} catch {
|
||||||
Console.WriteLine("That is not a number");
|
Console.WriteLine("That is not a number");
|
||||||
@@ -31,7 +31,7 @@ namespace Factorial {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BigInteger Factorial(int arg) {
|
static BigInteger Factorial(BigInteger arg) {
|
||||||
Stopwatch t = new Stopwatch(); ;
|
Stopwatch t = new Stopwatch(); ;
|
||||||
t.Start();
|
t.Start();
|
||||||
BigInteger value = 1;
|
BigInteger value = 1;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user