Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdlib.h>
- #include<stdio.h>
- using namespace std;
- int main()
- {
- cout<<"Podaj liczbe dzielnikow: ";
- int dziel;
- cin>>dziel;
- for(int i=1;i<250;i++)
- {
- int n=0;
- for(int j=1;j<=i;j++)
- {
- if(i%j==0)
- n++;
- }
- if (dziel==n)
- cout<<i<<endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement