Está en la página 1de 1

#include<iostream>

using namespace std;


int main()
{
int n,div=1,divisor,check;
cout<<"PROGRAMA PARA ENCONTRAR DIVISORES "<<endl;
cout<<"Introduzca un numero"<<endl;
cin>>n;
while(div<=n)
{
divisor=(n/div);
check=(n%div);
if(check!=0)
{}
else
{
cout<<divisor<<" , ";
}
div=div+1;
}
system("pause");
return 0;
}

También podría gustarte