Alright, I keep getting build errors on line 23 due to the fact that the "smallest" function does not take 2 arguments. I'm not really sure what I'm doing wrong.
#include <iostream>
usingnamespace std;
int smallest(); // function prototype
int main()
{
int num1, num2;
int z;
cout << "Enter two numbers and I will tell you which is the smallest." << endl;
cin >> num1 >> num2;
z = smallest(num1, num2);
cout << z << " is the smallest." << endl;
return 0;
}
int smallest(int x, int y)
{
return (x < y ? x : y);
}