zort56

Untitled

Jan 8th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x = 0;
  8.  
  9. cout << "Podaj liczbe: ";
  10. cin >> x
  11. for (int i = 1; i <= x; i++)
  12. {
  13.  
  14. if (x % i == 0) cout << i << " ";
  15. }
  16. system("pause");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment