Help Parameters.

#include <iostream>
#include <string>
using namespace std;

int Calculator(int x,int y){
int answera = x + y;
int answerb = x - y;
int answerc = x * y;
int answerd = x / y;
cout << x << " + " << y << " equals..." << answera << endl;
cout << x << " - " << y << " equals..." << answerb << endl;
cout << x << " * " << y << " equals..." << answerc << endl;
cout << x << " / " << y << " equals..." << answerd << endl;
}
int main()
{
Calculator(2000,1000);

system("PAUSE");
return 0;
}

why cant i say cin >> Calculator or cin >> x; or something in order to input into the parameter so the parameter function can output something from a input thx. im new to c++ if this isnt possible what choice should i use cases?
You aren't making any sense. Show what you tried to to do. That way, people will know what you did wrong.
i just wanna be able to input into the paramter instead of only output. or is that impossible?
Is this what you want?
1
2
3
4
int x;
int y;
cin >> x >> y;
Calculator(x, y);

i think that could work lemme try.
perfect. thx
Topic archived. No new replies allowed.