Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a=1,b=1,c,e;
- void podzielnosc(int a, int e)
- {
- for(int i=1; i<=a; i++)
- {
- b = b*10;
- }
- c = b/10;
- for(int j=c; j<b; j++)
- {
- if(j%e==0)
- {
- cout<<j<<endl;
- }
- }
- }
- int main()
- {
- cout<<"Podaj ilocyfrowe maja byc liczby"<<endl;
- cin >> a;
- cout<<"Podaj przez jaka liczbe maja byc podzielne"<<endl;
- cin >> e; //dzielnik
- podzielnosc(a,e);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement