:Calcu
color 4D
mode 250
echo -----------------------------------------------------------------------------------------------
echo Welcome To The Calculator
echo -----------------------------------------------------------------------------------------------
echo "------>You have the option do Adding Subtraction Multiplication and Division just type<-------"
echo "------>the question and it will give you the answer for each of the type<-------"
echo -----------------------------------------------------------------------------------------------
echo Type 1 For Addition, 2 For Subtraction, 3 For Multiplication And 4 For Division:
@set /p Type=
IF /I %Type%==1 (
echo Addition
@set /p First = Enter First Number:
@set /p Second = Enter Second Number:
@set /a Sum = %First% + %Second%
echo %First% + %Second% = %Sum%
)
IF /I %Type%==2 (
@set /p First = Enter First Number:
@set /p Second = Enter Second Number:
@set /a Sub = %First% - %Second%
echo %First% - %Second% = %Sub%
)
IF /I %Type%==3 (
@set /p First = Enter First Number:
@set /p Second = Enter Second Number:
@set /a Multi = %First% * %Second%
echo %First% X %Second% = %Multi%
)
IF /I %Type%==4 (
@set /p First = Enter First Number:
@set /p Second = Enter Second Number:
@set /a Div = %First% / %Second%
echo %First% รท %Second% = %Div%
)
IF /I %Type%=>5 (
echo Not a Valid Number
)
pause
goto Calcu
Can Anyone tell me why i am getting a missing operand error Im trying to make this calculator work but its not working The Math operations worked in another code block but not here