Calculator : Turbo C++

Calculator

  The following program is a Calculator that can be used to perform all the basic arithmetical operations. This program uses BGI graphics to create the user interface of the Calculator as well as to handle all of its special effects. If you need to learn about BGi Graphics, read How to Create Graphical Applications using Turbo C++ 3.0 IDE (BGI library) first.

Idle
Calculator in Action

Functionality

This calculator can be used for performing all the basic arithmetical operations viz. addition, subtraction, multiplication, division and squaring. The calculator has a three dimensional shape, and so do all of its buttons. In other words, it looks like a real world, three-dimensional object rather than a two dimensional shape rendered in a program. This is one of its best features. The buttons change colour when you click the left mouse button over them, which gives the impression that they’re actually being clicked. The two buttons at the bottom i.e. C and E are used for resetting the calculator’s screen to default i.e. making it blank.

As you can see in the above images, the digits appear on the left side of the display and increase from left to right. In other words, as you click buttons and enter more digits, the later digits appear on the right. This has been done for the sake of simplicity and to avoid any possible errors that may pop up in the execution of the program.

Please Note that when you click on any of the arithmetical buttons i.e. +, , *, / or sq^2 after entering the first number, the display becomes blank. Don’t worry, the number you entered has already been stored. Now, you have to enter the second number. After this, click =. The result of the operation would be displayed on the screen.

For example, as shown in the second image above, type 207936. Then click +. After this, enter the second number, say 9087. Now click = and the sum will be displayed on the screen. Simple !!! So, go on and check out the program.

Click here to view and download the source code of this program.
Click here to download calprj.exe only (Please note that it is a 16-bit executable and will not run on 64-bit systems).

(Visited 611 times, 1 visits today)

3 comments

  • Whats up. Are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and create my own. Do you need any html
    coding knowledge to make your own blog? Any help would
    be greatly appreciated!

    • Yes, I’m using WordPress for my blog. To create a wordpress blog of your own, you don’t need to learn html or any other language. It’s very simple to create a blog. However, if you know HTML/CSS/JavaScript etc., it would help you a lot.

  • You should try Yoast SEO plugin

Leave a Reply

Your email address will not be published. Required fields are marked *