Advertisement
TimxAG

Untitled

Jul 1st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int div_num( int n )
  5. {
  6. int count = 0, i=2;
  7. for (i=1;i<=n;i++)
  8. if (n%i==0) { cout << i << " "; count ++; }
  9. cout << endl << count;
  10. return 0;
  11. }
  12.  
  13. int main()
  14. {
  15. int n; cin >> n;
  16. div_num(n);
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement