OMG can some please help?
My code wont work even though it looks like it should.
Could some one please help me?
I'm learning some functions so this will help me practice.
Code:
#include <iostream>
#include <stdlib.h>
using namespace std;
int answer;
int add (int a, int b)
{
answer = a + b;
return (answer);
}
int subtract (int c, int d)
{
answer = c - d;
return (answer);
}
int multiply (int e, int f)
{
answer = e * f;
return (answer);
}
int divide (int g, int h)
{
answer = g / h;
return (answer);
}
int main ()
{
int pick1, pick2;
cin >> pick1, pick2;
cout << add (pick1, pick2);
cout << subtract (pick1, pick2);
cout << multiply (pick1, pick2);
cout << divide (pick1, pick2);
system("pause");
return 0;
}
Please help.
THanks