Skip to content

Instantly share code, notes, and snippets.

@mattn
Created August 25, 2010 23:54
Show Gist options
  • Save mattn/550529 to your computer and use it in GitHub Desktop.
Save mattn/550529 to your computer and use it in GitHub Desktop.
@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