help writing this short script in windows shell scripting?

Short Run Printing

@echo off
write a script that declares 2 numeric variables. the value should be input when the script is run. the script should print the sum of the 2 numbers


One Response to “help writing this short script in windows shell scripting?”

  1. Ken B — May 25, 2009 @ 3:03 pm

    Windows batch files don't have typed variables. The best you could do would be something like this, which depends on valid input from the user.

    @echo off
    set /p first=First number:
    set /p second=Second number:
    set /a sum=%first% + %second%
    echo Sum = %sum%

    - kb -

Leave a Reply

Powered by Yahoo! Answers
Powered by WP VideoTube