Ask
your own question, for FREE!
Computer Science
18 Online
Write a script called FindFactorial.m to do the following:- Ask user to input an integer (k)- Find the smallest integer (n) for which the factorial n! is greater than k Your script can have just one loop and you may NOT use MATLAB built-in function to calculate factorial.Run your script for k = 123456 and find the result.
Still Need Help?
Join the QuestionCove community and study together with friends!
How about this: ```python k = input('Please enter an integer k:'); n = 0; n_factorial = 1; while n_factorial <= k n = n + 1; n_factorial = n_factorial * n; end fprintf('%d! > %d\r\n', n, k); fprintf('%d! = %d\r\n', n, n_factorial); ``` I tested it here: http://www.tutorialspoint.com/execute_matlab_online.php
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol:
@tinydinoUwU stop trying to find a argument u blad lil boy
TinydinoUwU:
**(Verse 1)** Yo, trapped in a box, Iu2019m feelin' so confined, Lifeu2019s a game of chess, but Iu2019m stuck in rewind, Every dayu2019s a struggle, man, I
Arriyanalol:
hey umm so i need help with my lanauage art ixl anybody wanna help big mama
Nina001:
ho where do i go to buy Subscirption for a moving pfp because on my screen im on
20 hours ago
5 Replies
3 Medals
1 hour ago
13 Replies
5 Medals
4 days ago
2 Replies
2 Medals
5 days ago
4 Replies
2 Medals