Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int a,b;
- void podzielnosc(int a, int b)
- {
- int c=pow(10,a-1);
- int d=pow(10,a);
- while(c<d)
- {
- if(c%b==0)
- {
- cout << c << endl;
- }
- c++;
- }
- }
- int main()
- {
- cout << "ilo-cyfrowe" << endl;
- cin >> a;
- cout << "dzielnik" << endl;
- cin >> b;
- cout << endl;
- podzielnosc(a,b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement