i have to write a bool function that checks the numerator to make sure its not a 0 and the symbol to make sure its a slash. if the conditions are met, the function shold return true. i need help setting up this function and using is. this is the code i have so far.
void addFractions (int num1, int denom1, int num2, int denom2);
void subtractFractions (int num1, int denom1, int num2, int denom2);
void multiplyFractions (int num1, int denom1, int num2, int denom2);
void divideFractions (int num1, int denom1, int num2, int denom2);
int main()
{
int num1;
int denom1;
int num2;
int denom2;
char slash;
cout << "Enter fraction x: ";
cin >> num1 >> slash >> denom1;// This is where the user enters the first fraction.
'\n';
cout << "Enter fraction y: ";
cin >> num2 >> slash >> denom2;// This is where the user enters the
second fraction.
the bool function should be used where the first and second fractions are entered.
any ideas from anybody?