Introduction: How to Make a Calculator With Command Promt

Picture of How to Make a Calculator With Command Promt




hey guys, this can help you in maths classes :) this is a simple calculator that also lets you change the colour at the start by typing in a colour code. colour codes can be shown if yout type z when your asked to choose one. because sreenshots werent working i can only give you the codes

Step 1: The Code

Picture of The Code

to make the calculator simply copy and paste this code into notepad then save it as a .bat


@echo off
title calculator
color 0f
echo.
echo.
echo ___________________________________________________________________
echo                                                                                                                                                            -
echo Colour Changer, Type In The Colour Code You Want Then Press Enter.-
echo                                                                                                                                                            -
echo ___________________________________________________________________
echo.
echo.
set /p code=colour Code:
color %code%
cls
goto top
:top
echo Colour Code: %code%
echo ________________________________________________________________
echo                                                                                                                                                    -
echo My Calculator                                                                                                                           -
echo Just Type In Your problem Sum And press Enter                                                            -
echo Add=+ Subtract=- Multiply=* Divide=/ previous answer=ans                                         -
echo Note: Answers For Division Are Rounded Off                                                                   -
echo                                                                                                                                                    -
echo ________________________________________________________________
echo.
set /p prob=
set /a ans=%prob%
echo.
echo =%ans%
echo ________________________________________________________________
pause
cls
echo Previous Answer: %Ans%
goto top
pause
exit

Step 2: Test It Out!

Picture of Test It Out!

test it out if there are any problems just comment, feel free to change it just please give me credit. also thanks to my friend for helping me with the codes. hope it works and have fun! if it doesn't work post a comment about the problem and code and ill show see if i can find the problem, or if my friend can.

Comments

tareqtech (author)2017-06-06

kane color

WaterLemon7 (author)2011-03-08

all credit to my dear friend elie :D

WaterLemon7 (author)2011-03-08

Hope you enjoy using it :D

About This Instructable

9,636views

5favorites

License:

More by WaterLemon7:How to use command prompt, easyHow to make a sphere volume calculator with command promptHow to make a circle area finder with command prompt
Add instructable to: