Advertisement
PiotrJurek

Zad16

Mar 29th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void DZIELNIKI(int n)
  6. {
  7. for(int i=1; i<=n; i++)
  8. {
  9. if(n%i==0)
  10. {
  11. cout << i << " ";
  12. }
  13. }
  14. cout << endl;
  15. }
  16.  
  17. int main()
  18. {
  19. DZIELNIKI(100);
  20. DZIELNIKI(-100);
  21. DZIELNIKI(1678);
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement