How to Make a Calculator With Command Promt

Introduction: 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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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 Colour Changer, Type In The Colour Code You Want Then Press Enter.-
echo                                                                                                                                                            -
echo ___________________________________________________________________
set /p code=colour Code:
color %code%
goto 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 ________________________________________________________________
set /p prob=
set /a ans=%prob%
echo =%ans%
echo ________________________________________________________________
echo Previous Answer: %Ans%
goto top

Step 2: 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.

Be the First to Share


    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    3 Discussions