Question: I need help to to run this code by Runtime on n = 100000 in less than 10000 millisecond you can rewrite the function calcFactorial()

 I need help to to run this code by Runtime on
n = 100000 in less than 10000 millisecond you can rewrite the
I need help to to run this code by Runtime on n = 100000 in less than 10000 millisecond you can rewrite the function calcFactorial() and printFactorial() in any way you want, but dont change main(). and thanks for your help

to compildi icc -01 - Foctorisl coctorisl.c to runt / Factorial - 1000 - 1 default 100 do: dosult, print runtime in nec 1: print the actorial #include #include #include #include #include #define nDEFAULT 100 #define LEN 1080000 // 123456 1/when compiled with -01 optimization 1 10800 312.8 msec / 100000, 40478.3 ASOC static unsigned int factorial(LEN), len; static void colcFactorial(unsigned int n) { unsigned int carry, 1.3i len = factorial(e) - 1; for (i = 1; i while (carry){ factorial(len++] - carry % 10; carry = carry / 10; 3 static void printFactoriel (void) { int i; for (i = lon; i > 0: 1---) printf("Kids, factorioits - 11) printf(" "); make changes before this black Do NOT change anything in mano) static void printFootorit(void) { int i; for (i = len; i > B; i--) printf("%10", factoriali - 1)); printf(" "); } + make changes before this block + Do NOT change anything in main() | */ int main(int argc, char *argv[]) { int c, n = NDEFAULT, debug = @; struct timeval te, t1; float elapsed; while ((c = getopt(argc, argv, "din:")) = -1){ switch (c) { case 'd': sscanf (optarg,"%d", &debug); break; case 'n': sscanf(optarg. "%d", &n); break; default: break; } > if (n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!