Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int DZIELNIKI(int a)
- {
- for (int i=a;i>=1;i--)
- {
- if (a%i==0)
- {
- cout << i << " ";
- }
- }
- }
- int main()
- {
- int a;
- cout << "Podaj liczbe ktorej chcesz poznac wszystkie dzielniki: ";
- cin >>a;
- cout << "Dzielniki to: "; DZIELNIKI(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement