(C++) Bool functions. *New to programming* : I have a bit of a problem with bool functions. The second sentence prints out no matter the salary I would input. 

My task:

//Define a function that will decide if someone can rent an apartment based on the salary he/she makes.

//The rent should be at most one-third of the salary. If it is more than one third, the customer’s application will be denied.  

//The function’s purpose is to decide whether the customer is qualified or not.

Here is my problem child:

 

    if (age > 17)
        		{    			
        			if (canbuy(salary, rent))
        			{
        				cout << "Based on the information you have provided, you are qualified. You are old enough and have money." << endl << endl;
        				
        			}
        			else
        			{
        				cout << "Based on the information you have provided, you are not qualified. Sorry... Make more money next time.  " << endl << endl;
        				
        			}

Here is the function definition for 'canbuy':

    bool canbuy(double salary, double rent)
    {
        if (rent <= ((1 / 3)* salary))
        {
            return true;
        }
    
        else
        {
            return false;
        }

        return canbuy;
    }

Visual example of outcome:
[https://i.imgur.com/WE28e1H.png][1]

Here is the whole program:
    
       
    
     #include <iostream>
        #include <cmath>
        #include <string>
        using namespace std;
        
        //Define a function that will decide if someone can rent an apartment based on the salary he/she makes.
        
        //The rent should be at most one-third of the salary. If it is more than one third, the customer’s application will be denied.  
        
           
        
        
        bool canbuy(double salary, double rent);
        
        const double rent = 1200;
        
        
        int main()
        {
        	int salary;
        	int age;
        	char ans;
        	string fullname, lastname;
        
        	do
        	{
        		cout << "Hello. Welcome to the Renting Evolution Center... " << endl << endl;
        
        		cout << "This apartment's monthly rent is $1200. " << endl << endl;
        
        		cout << "I need to gather your information to see if you qualify: " << endl << endl;
        
        		cout << "Your full name, please:     ";
        
        		cin >> fullname;
        		cin >> lastname;
        		cout << endl;
        
        
        
        
        
        		
        		cout << "Your age, please:   ";
        		cin >> age;
        		cout << endl;
        
        
        
        		
        		cout << "Your salary, please:     ";
        		cin >> salary;
        		cout << endl;
        
        
        		
        		cout << "We will now process your information to see if you are qualified to purchase a house..." << endl << endl;
        
        		system("pause");
        
        		
        		if (age > 17)
        		{
        			
        			if (canbuy(salary, rent))
        			{
        				cout << "Based on the information you have provided, you are qualified. You are old enough and have money." << endl << endl;
        				
        			}
        			else
        			{
        				cout << "Based on the information you have provided, you are not qualified. Sorry... Make more money next time.  " << endl << endl;
        				
        			}
        		}
        
        		
        		else
        		{
        			cout << "Based on the information you have provided, you are not qualified. Sorry... Get older next time..." << endl << endl;
        		}
        
        		
        
        		
        		cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
        		cout << "Would you like to enter new information?: ";
        		cin >> ans;
        		cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
        
        		cout << endl;
        
        	} while (ans == 'y' || ans == 'Y');
        
        	cout << "Goodluck with house shopping! " << endl;
        
        	system("pause");
        	return 0;
        }
        
        
        bool canbuy(double salary, double rent)
        {
        	if (rent <= ((1 / 3)* salary))
        	{
        		return true;
        	}
        
        	else
        	{
        		return false;
        	}
        
        	return canbuy;
        }


  [1]: https://i.stack.imgur.com/KWyOV.png