Amicable numbers 2

int main()
{
int low;
int high;

//range
cout << "input the start of the range: " << endl;
cin >> low;

if (low <= 0) {
cout << "unable to check non-posative values." << endl << "exiting" << endl;
}

cout << "input the end of the range: " << endl;
cin >> high;

if (high <= 0) {
cout << "unable to check non-posative values." << endl << "exiting" << endl;
}

if (low > high) {
varSwitch (low, high);
}

amicNums (int low, int high);

return 0;
}

this line of code ..... amicNums (int low, int high); ..... has an error that says (expected primary expression before "int" idk why this is could someone please help... Thank you
Please put your code in code tags.

This line:

amicNums (int low, int high);

It looks like it's a function prototype, but it's inside main, so I assume you're trying to call a function.

- If this is a function prototype, move it outside of main.

- If you are trying to call a function called amicNums, don't put the ints before the parameters: amicNums(low,high);
Topic archived. No new replies allowed.