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