Advertisement
Guest User

Untitled

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