" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
{
unsigned g,i;
g = sqrt(n);
for(i = 2; i <= g; i++)
{
while(n % i == 0)
{
cout << i << " ";
n /= i;
}
if(n == 1)
{
cout << endl;
return;
}
}
cout << n << endl;
}
int main()
{
unsigned n;
cin >> n;
czynniki(n);
return 0;
}