Calculator in C using Graphics :
This Calculator program is developed in C Language and using its Graphics Library. This is a very nice program with attractive user interface and Mouse is enabled in it to click the buttons and Hovering effect is also present. It can calculate any type of arithmetic expression.
It is provided with all the features needed for a standard calculator. This program is developed for Windows, but can be modified easily for any other OS.
If you didn't understand the program, you can post the comments.
A tutorial on Graphics using C will be provided shortly and the link will be updated soon.
Here, I am presenting the Calculator Program developed using C Graphics library.
2. Turbo C++ or any other C Compiler
3. DOS BOX (optional)
Note:
Windows 7 does not support full-screen mode. So, programs using graphics cannot be executed in Windows 7. To resolve this issue, do the following :
( Assuming, Turbo C++ is installed in D:\ and its directory structure as this :
D:\
|
|--- TC
|
|-- BIN
|-- BGI
|-- LIB
|-- INCLUDE
|
)
( Theme is run the Turbo C++ IDE through DOS Box, which emulates the 16-bit Environment for supporting full-screen mode).
1. Download and Install DOS BOX
2. Start DOS BOX
3. In the Command Prompt window opened, type the following:
mount d: d:\
d:
cd tc\bin
tc
4.Now, a Turbo C++ IDE opens, and continue to execute the program
This Calculator Program uses Data Structures Concepts like
It is provided with all the features needed for a standard calculator. This program is developed for Windows, but can be modified easily for any other OS.
If you didn't understand the program, you can post the comments.
A tutorial on Graphics using C will be provided shortly and the link will be updated soon.
Calculator using C Graphics |
Here, I am presenting the Calculator Program developed using C Graphics library.
Requirements :
1. Windows XP / Vista / 72. Turbo C++ or any other C Compiler
3. DOS BOX (optional)
Note:
Windows 7 does not support full-screen mode. So, programs using graphics cannot be executed in Windows 7. To resolve this issue, do the following :
( Assuming, Turbo C++ is installed in D:\ and its directory structure as this :
D:\
|
|--- TC
|
|-- BIN
|-- BGI
|-- LIB
|-- INCLUDE
|
)
( Theme is run the Turbo C++ IDE through DOS Box, which emulates the 16-bit Environment for supporting full-screen mode).
1. Download and Install DOS BOX
2. Start DOS BOX
3. In the Command Prompt window opened, type the following:
mount d: d:\
d:
cd tc\bin
tc
4.Now, a Turbo C++ IDE opens, and continue to execute the program
This Calculator Program uses Data Structures Concepts like
- Stacks
- Infix to Postfix Conversion and
- Evaluation of Postfix Expression
main() function is contained in the following file "Calculator.C"
It includes the remaining two files "INTOPO.C" and "POSTEVAL.C"
Before Executing, don't forget to change the path in "initgraph()" function present inside the main() function of Calculator.C
Change G:\\TC\\BGI according to the Turbo C++ Compiler Installed path in your System
Download Files :
Here are the download links for the files :
1. Calculator.C
2. INTOPO.C
3. POSTEVAL.C
Required Software Links :
Turbo C++ Compiler
DOS BOX
link is broken pls post new links
ReplyDelete