Coding Challenge - Factorial Coding Challenge
Challenge Description: |
Factorial Coding Challenge |
| Create a VI that computes the factorial of an I32 integer. The factorial of an integer n, denoted as n!, is the product of all the positive integers from 1 to n. For example: 1! = 1 Additionally, the factorial of 0, 0!, is 1. For more information on the definition of factorials, visit the National Institute of Standards and Technology Web site. Your VI will take, as input, an I32 integer between 0 and 10,000. It will output the factorial of that integer as a string. The resulting string must be the exact decimal representation of the factorial, correct to the last digit (no rounding and no leading zeroes, spaces). If the input value is out of range, your VI should return the message "ERROR: Input out of range" and terminate execution. Submissions yielding incorrect results will be disqualified. The scoring will be done on several different operating systems and processor architectures. Scores will be based on accuracy and speed of the VI and the coding style. For help with coding style, see Chapter 6 of the LabVIEW Development Guidelines. It should be simple to develop a VI which finds the factorial of smaller integers. The situation becomes more complex, however, when your output value is greater than what can be stored by an I32. That is why the output is stored as a string. Your solution must use the same connector pane as Factorial.vi (download here). This is the framework for your VI. If you submit a solution with sub-VIs, please include all your VIs inside an LLB with the top-level VI named "Factorial.vi". Rules Specific to this Challenge
|
| |
Ask questions and share ideas on this challenge in the Discussion Forums. | Suggest a Challenge See the results of Past Coding Challenges |

Ask questions and share ideas