bkirankumar
asked on
Problem with the arithmatic operations like addition.
Hi,
I am trying to write a batch file which takes two parameters are input. The prog is given below.
for %j IN (1,1,%1) do GOTO=LOOP
:LOOP
IF %j == %1 GOTO END
set PRNNO = %2 + %j
echo %PRNNO%
:END
here the for loop has to go on till %1 number of times with increments of 1. Then each time it has to display the sum of the j value in the loop and the second parameter. Can some body help me in this regard.
-Kiran
I am trying to write a batch file which takes two parameters are input. The prog is given below.
for %j IN (1,1,%1) do GOTO=LOOP
:LOOP
IF %j == %1 GOTO END
set PRNNO = %2 + %j
echo %PRNNO%
:END
here the for loop has to go on till %1 number of times with increments of 1. Then each time it has to display the sum of the j value in the loop and the second parameter. Can some body help me in this regard.
-Kiran
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.