0

write the code in java with the recruiting and non-recurring factorial function and measuring the execution time.

11th Dec 2017, 8:15 PM
Arton A Ajeti
Arton A Ajeti - avatar
11 Respostas
0
You will find your answer in the link below regarding the measurement of execution time. As for the other piece regarding the recurring and non-recurring factorial function, I am going to challenge you to figure that piece out yourself for now. you can learn if the whole thing is written for you. :) Please upvote and mark as answer if this suits your needs. Thanks. https://stackoverflow.com/questions/5204051/how-to-calculate-the-running-time-of-my-program&ved=0ahUKEwi2zvnA-YfYAhVk34MKHW-jAM0QjjgIJTAA&usg=AOvVaw3qdy2m21HUIOiuY0z_AxC6
13th Dec 2017, 10:08 PM
Ryan Wakefield
Ryan Wakefield - avatar
0
thx very much
14th Dec 2017, 7:37 PM
Arton A Ajeti
Arton A Ajeti - avatar
0
If you end up needing help with the factorial piece or code structure, don't hesitate to paste. copy of your code here and I can assist there as well.
14th Dec 2017, 7:56 PM
Ryan Wakefield
Ryan Wakefield - avatar
0
I have problem not write code help me plz
15th Dec 2017, 6:46 PM
Arton A Ajeti
Arton A Ajeti - avatar
0
What problem are you having writing the code? Please post a copy of the current code you have so we can help troubleshoot.
15th Dec 2017, 11:26 PM
Ryan Wakefield
Ryan Wakefield - avatar
0
int Factorial (int n) { if (n<=1) return (1); else return (n*Factorial(n-1)); }
16th Dec 2017, 7:13 PM
Arton A Ajeti
Arton A Ajeti - avatar
0
where to write the code to measure how many seconds it is running
16th Dec 2017, 7:14 PM
Arton A Ajeti
Arton A Ajeti - avatar
0
well, you would want to start your counter before doing the factorial a d then stop it after. Then you print it out, store it, send it somewhere, or do with it whatever you would like. Hope that helps
16th Dec 2017, 7:23 PM
Ryan Wakefield
Ryan Wakefield - avatar
0
where write include time.h
16th Dec 2017, 7:26 PM
Arton A Ajeti
Arton A Ajeti - avatar
0
I'm not trying to be mean when I say this, but I don't believe it in your best educational interest for me to fully write the code for you as then you don't necessarily learn anything. I would recommend reading through that link I posted as that should give you almost all the answer. Sorry, you can't learn if someone writes all of the code for you. Worrying it yourself had been proven to increase retention and understanding.
16th Dec 2017, 7:42 PM
Ryan Wakefield
Ryan Wakefield - avatar
0
oki thanks very much ....
16th Dec 2017, 7:44 PM
Arton A Ajeti
Arton A Ajeti - avatar