# Answer to Question #24117 in Other Programming & Computer Science for monami

Question #24117

Create a batch file program that would make simple calculator.

The numbers to be entered must have 1 whole number and with 2 decimal points.

The output must be in the center of the screen.

The numbers to be entered must have 1 whole number and with 2 decimal points.

The output must be in the center of the screen.

Expert's answer

@echo off

rem DOS batch language doesn't support floating point values

:calc

cls

echo Enter mathematical expression:

set /p expression=

set /a result=%expression%

set result= & %result%

echo %result:~-40%

pause

goto calc

rem DOS batch language doesn't support floating point values

:calc

cls

echo Enter mathematical expression:

set /p expression=

set /a result=%expression%

set result= & %result%

echo %result:~-40%

pause

goto calc

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment