Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- ::Created By Guerrerohgp
- :ini
- set result=1
- set/p "num=Ingrese su numero: "
- if not defined num goto:ini
- call:Function_factorial !num!
- echo.El factorial de !num! es !result!
- pause>nul
- exit
- :Function_factorial
- if %1==1 goto:eof
- set/a "result*=%1"
- set/a "n=%1-1"
- call:Function_factorial !n!
Advertisement
Add Comment
Please, Sign In to add comment