1 x 7=7
2 x 7=14
3 x 7=21
4 x 7=28
5 x 7=35
6 x 7=42
7 x 7=49
this is my code:@echo off
:start
set /p i=insert a number:
set /p a=multiplied times:
goto multi
:multi
set /a ctr=%ctr%+1 -->problem
set /a pro=%i%*%a%
echo %i% x %a%=%pro%
pause
goto start
Do more with
@echo off
setlocal enabledelayedexpansion
:start
set Number=
set /p Number=insert a number, or nothing to exit:
if "%Number%"=="" goto :eof
set /p Times=multiplied times:
for /L %%i in (1, 1, %Times%) do (
set /a Product = %%i * Number
echo %%i x %Number% = !Product!
)
pause
goto start
Premium Content
You need an Expert Office subscription to comment.Start Free Trial