In C++
Create a function called Factor. It should output to the console all the factors of a number. So, if you receive 15, it should output 1,3,5.
#include <iostream>
using namespace std;
void Factor(int n){
for(int i = 1;i<n;i++){
if(n%i==0){
cout<<i<<endl;
}
}
}
int main()
{
Factor(15);
return 0;
}

1 3 5
In C++ Create a function called Factor. It should output to the console all the factors...