:mrgreen: I've just started learning and doing examples out of the book but I wanted to see if I could actually make something besides just copying stuff out of a book. So I tried to make an addition calculator.
This isnt the entire source code but just a few snippets to make sure that im getting the procedure right.
#include <iostream>
using namespace std;
int main()
{
cout << "Plase enter 2 numbers to be added ";
int a;
int b;
cin >> a;
cin >> b;
cout << " a + b = " << a + b << endl;
return 0;
}
Would this work?
If this goes well I would like to expand it with if statements by asking what function to use with cout having the user enter either a for + b for - c for * and d for /. Then assign a function that if variable "number" is = "(whatever operation sign given)" then do this.
Does this seem logicaly reasonable or have i got the entire procedure wrong on hwo to do it?