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