Can someone help me?

I try to use function to find out how many negative numbers in three numbers, but I don't have any ideas. PLZ help me!
this is what I wrote:

#include <iostream>
using namespace std;

int howmanynegs (int,int,int);


int main()
{
int a,b,c;
cout << "Please enter the first number: ";
cin >> a;
cout << "Please enter the second number: ";
cin >> b;
cout << "Please enter the third number: ";
cin >> c;

howmanynegs (a,b,c);
cout << << " of these numbers is/are negative." << endl;



return 0;
}

int howmanynegs (int x, int y, int z)
{

return;
}

Instead of int howmanynegs (int x, int y, int z) try making a function that takes one number and checks if it is negative. For Example
1
2
3
4
5
6
bool isNeg(int num){
if(num < 0)
return true;
else
return false;
}
Topic archived. No new replies allowed.