As above, I'm still trying to figure out the most part, as I have only taken recently interest into picking up programming.
My current code is:
#include <iostream>
using namespace std;
int a, b, sum, c, d, e, f, g, h,
struct database ()
{
string name= add, subtract, multiply, divide;
};
int main ()
{
database calculator;
string name;
cout << "Would you like to (add), subtract),(multiply) or (divide)?";
getline(cin, name);
if (add)=true
cin >> a;
cin >> b;
sum = a+b;
cout << sum << endl;
if else
(subtract)=true
cin >> c;
cin >> d;
sum = c-d;
cout << sum << endl;
if else
(multiply)=true
cin >> e;
cin >> f;
sum = e*f;
cout << sum << endl;
if else
(divide) =true
cin >> g;
cin >> h;
sum = g/h;
cout << sum << endl;
return 0;
}
The basic gist of this thing is a calculator based on what the user wants to do, but I can't figure out a correct way to do it.