I'm new to batch script and have trouble with a very simple code.
I'm trying to print the changes of variables in the nested loop as below but it doesn't work. (e.g. n_total : 5->10->15->...)
Also, ratio is the result of adding two numbers in a string form. (e.g. "5" + "5" = "55")
@echo off
setlocal enabledelayedexpansion
set /A n_total=5
set /A step=100
for /L %%A in (step,100,1000) do call(
for /L %%B in (n_total,5,30) do call(
set n_c=%%B/2
set n_d=%%B - !n_c!
set /A ratio=!n_d! + !n_c!
echo %%B
echo %n_c%
echo %ratio%
Only
Some kind of error?
%B
%B/2
shows up in the executed result. Please let me know what's wrong with my code. Thank you!