SHARE
TWEET

Untitled

MeehoweCK Aug 20th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     unsigned liczba;
  8.     cout << "Podaj liczbe naturalna: ";
  9.     cin >> liczba;
  10.     unsigned dzielnik = 1;
  11.  
  12.     cout << "Naturalne dzielniki liczby " << liczba << ":\n";
  13.  
  14.     while(dzielnik <= liczba)
  15.     {
  16.         if(liczba % dzielnik == 0)
  17.             cout << dzielnik << '\t';
  18.         ++dzielnik;
  19.     }
  20.     return 0;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top