computing
  • 0

Can You Use Cmd As a Calculator?

  • 0

Hi I saw somewhere on a website that set /a=4+2 gives you the awnser 6 but it gives me a missing operand error.
What i want to do is I want the user to input 2 numbers (set /p=) and then I want to assighn these numbers variables and then I want to do calculations with these numbers. If you can maybe halp me? Thanks

D_Pikster

Share

1 Answer

  1. You must give a variable name if you to use “=”, omit the “=” and it will just output the number:

    set /a variable=4+2
    echo %variable%
    

    • 0