Here is a sample shell code to calculate factorial using while loop: 39. . 40. . 41. . 42. #!/bin/bash. 43. counter=$1. 44. factorial=1.
確定! 回上一頁