Hello again, so I decided I would work on my calculator more, and make it able to multiply. so far, its doing pretty well. Onlything I'm not to sure about is making a menu (So I can select if I want to add, divide, multiply, or subtract)
I'm no longer getting this error undefined reference to `WinMain@16'
but I would love if someone could help me with the menu. :)
#include <iostream>
usingnamespace std;
int multiply (int d, int e)
{
return (d*e);
}
int add (int a, int b)
{
return (a+b);
}
int main1 ()
{
int a, b, c;
cout << "enter two numbers to add: ";
cin >> a;
cin >> b;
c=add (a,b);
cout << a << "+" << b << "=" <<c;
return 0;
}
int main2 ()
{
int d, e, f;
cout <<"enter two numbers to multiply: ";
cin >> d;
cin >> e;
f=multiply (d,e) ;
cout << d << "x" << e << "=" <<f;
return 0;
}