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