Created
August 25, 2010 23:54
-
-
Save mattn/550529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem http://e-arrows.sakura.ne.jp/2010/08/is-lisp-really-has-too-many-parenthesis.html | |
rem 引数が13くらいからおかしくなるので注意 | |
setlocal | |
set ret=1 | |
set num=%1% | |
:while | |
if %num% equ 0 goto endwhile | |
SET /a ret=%ret% * %num% | |
SET /a num=%num% - 1 | |
goto while | |
:endwhile | |
echo %ret% | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment