Advertisement
wiktormadera

zad16

Apr 2nd, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. {
  6.     for(int i=1;i<=n;i++)
  7.     {
  8.         if(n%i==0)
  9.         {
  10.             cout << i << ", ";
  11.         }
  12.     }
  13. }
  14.  
  15. int main()
  16. {
  17. int n;
  18.     cout << "Funkcja dzielniki. Podaj liczbe naturalna" << endl;
  19.     cin >> n;
  20.     DZIELNIKI;
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement