Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void PODZIELNOSC(int x, int y)
- {
- int i=1;
- int tymczasowa;
- if (x > 1)
- {
- for (int j = 0; j < x-1; j++)
- {
- i *= 10;
- }
- }
- tymczasowa = i * 10;
- do
- {
- if (i % y == 0)
- {
- cout << i << " ";
- }
- i++;
- } while (i < tymczasowa);
- cout << "\n";
- }
- int main()
- {
- PODZIELNOSC(1, 4);
- PODZIELNOSC(2, 6);
- PODZIELNOSC(3, 8);
- PODZIELNOSC(4, 92);
- }
Advertisement
Add Comment
Please, Sign In to add comment