Advertisement
MeehoweCK

Untitled

Jul 12th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     unsigned liczba, dzielnik = 1;
  8.  
  9.     cin >> liczba;
  10.  
  11.     while(dzielnik < liczba)
  12.     {
  13.         if(liczba % dzielnik == 0)
  14.             cout << dzielnik << " ";
  15.         ++dzielnik;
  16.     }
  17.     cout << liczba << endl;
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement