fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int n = 5452237, i=2;
  5. //do{cin>>n; }while (n<=0);
  6. while (n > 1)
  7. {
  8. if (n%i==0) {
  9. cout<<i<<" ";
  10. n=n/i;
  11.  
  12. }
  13. else i++;
  14. }
  15.  
  16. cout << n;
  17.  
  18. if (n>1)
  19. cout << n ;
  20.  
  21. }
Success #stdin #stdout 0.01s 5328KB
stdin
Standard input is empty
stdout
7 127 6133 1