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