Advertisement
Guest User

Dzielniki liczby a

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