Calculator

I've recently finished working on a C++ calculator. Here is a list of its features so far...

It can calculate addition, subtraction, multiplication and division problems.
It can work with both positif and negatif integers.
It has an easy-to-read layout.
Currently supports all Windows versions.
Runs in Command Prompt (cmd).

Here is the MediaFire download link:


http://www.mediafire.com/?l68tqsiactk8b90

Here is the source code:

http://pastebin.com/ckN6fthm

Copyright © 2012 Evan Malz, All rights reserved.

I started learning C++, and this is the first program I've made in my entire short life (I am only 13 years old, so remember that when you're hatin'). If you have any questions about the calculator or basic C++ or suggestions for it, please let me know!
Last edited on
You should probably just distribute the source code. Most people are leery of downloading and running a random executable.
Yeah, I'm going to post the updated version of the calculator now, and also put the source code somewhere.
"Just started learning (enter a recent date), I am in (high school/middle school) and (enter an age under 18) years old"


I see a lot of posts like this for some reason.
Well... I just don't want people hating on this too much, so I let them know that I am new to this stuff.
here are mine calculator
http://cplusplus.shinigami.lt/2012/04/05/17/
can count formulas like this 2*3+6*8+(3+sqrt(25+32/2)*ln(2+35)-sin(25+65*2)/cos(54*8+7))/log(25*2)-5*sqrt(25-15)/3*sinh(2)

Put a GUI to, but can be used in terminal too. Main for terminal:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <string>
#include <iostream>
#include "calculator.h"
using namespace std;

int main ()
{
	Calculator calc;
	double result;
	int answer;
	string equation = "2*3+6*8+(3+sqrt(25+32/2)*ln(2+35)-sin(25+65*2)/cos(54*8+7))/log(25*2)-5*sqrt(25-15)/3*sinh(2)";
	do
	{
		cout << "Do you want to enter your equation? Yes (1) or No (0)." << endl;
		cin >> answer;
		if (answer > 0) 
		{
			cout << "Enter your equation:" << endl;
			cin >> equation;
			cout << endl;
		}
		calc.add_to_equation(equation);
		result = calc.count_equation();
		if (calc.show_errors() > 100) 
		{
			cout << "ERROR: " << calc.show_errors() << endl;
		}
		else 
		{
			cout << "Equation: " << equation;
			cout << " = " << result << endl << endl;
			cout << "----------------------------------" << endl << endl;
		}
		calc.delete_from_equation();
	}
	while (answer);
	return 0;
}


Made on Ubuntu.
And here I was thinking Shinigami's only wasted time and wrote human names in death notes. :-P
Topic archived. No new replies allowed.