I wanted to write a program that finds the factor of a no. eg 2 and 5 are factors of 10. But that program is not working .Please tell me what is wrong with my program.Also tell me how to finally write like "10=2*5". Despite having learned functions and arrays i don;t seem to be able to put them to use. Please help me.
using namespace std;
int function (int a, int b);
int main ()
cout<<"This program finds the factor of a no."<<endl;
cout<<"Please input a no."<<endl;
cout<< b <<"is a factor of " << a<<endl;
int function ( int a,int b)