I am trying to get my program to run when I input two integer numbers in the subroutine, and then do the following math (x+y)/5. Dont know where I am going wrong.
#include<iostream>
using namespace std;
int Divide(int X,int Y);
int main()
{
int X;
int Y;
cout<<"first number:";
cin>>X;
cout<<" second number:";
cin>>Y;
cin.ignore();
cout<<"The difference of your two numbers is "<< Divide(X,Y)<<"\n ";
cin.get();
}
int Divide(int X, int Y)
{
return (X+Y)/5;
}