I'm a newbie at programming so i started learning it on the internet and I'm trying to improve my skills , but i've got a problem that is , i want to make a calculator , i decided that my calculator will only have 3 operations , + ; - ; * .
I want to open the console and it will give me a message about what kind of operation i want to do , addition , subtraction or multiplication.
There is the problem , i cant define a rule that if i press the F1 key it will stand for the addition operation , if i press the F2 it will stand the subtraction , and if i press F3 it will stand for multiplication.
I'm saying F1 , F2, F3 but it can be any Key like a , b ,c whatever
I'll let here my code
using namespace std;
int F1(int x, int y)
int answer = x + y;
int F2 (int z, int c)
int minusanswer = z - c;
int F3 (int v, int b)
int multipanswer = v * b;