[C++]How to make a calculator

Posts 16 of 6 · Page 1 of 1
[C++]How to make a calculator
start making a Console Application MSDOS.

Empty Project.

Type

#include <iostream>

using namespace std;

int main()
{
system ("TITLE Simple Calculator");
int num1,num2;
cout << "Please enter 2 numbers: " << endl;
cin >> num1 >> num2;
cout << num1 << " + " << num2 << " = " << num1 + num2 << endl;
cout << num1 << " - " << num2 << " = " << num1 - num2 << endl;
cout << num1 << " * " << num2 << " = " << num1 * num2 << endl;
cout << num1 << " / " << num2 << " = " << num1 / num2 << endl;
system("PAUSE");
return (0);
}

There ya go
how about:
Code:
#include <iostream>
int main()
{
system("calc.exe");
return 0;
}
>_>...

Alright I'll try to refrain from critcizing to harshly, but it would be nice if you put your calculator in a loop and used a switch, for different math functions. Otherwise I suppose this is a somewhat acceptable at using cout statements, but pathetic attempt at making a calculator, but it is good start for having absolutely no experience in C++...
That's not really helpful to anyone. It doesn't explain anything. Maybe you can elaborate a little on what's going on here?
Is this a tutorial? Because if it is, a retard like me doesn't understand.
It's not really a "How To" guide. More like a "Copy This Text in Compiler and Run" type of guide.
again with the shitty copy and paste and we learn nothing from you but your no sensed shitty post
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?