Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int PODZIELNOSC(int a, int b);
- int main(){
- int a, b;
- cout << "wprowadz 2 liczby: "<<endl;
- cin >> a >> b;
- cout << endl;
- cout << "Twoje liczby to: ";
- PODZIELNOSC(a,b);
- }
- int PODZIELNOSC(int a, int b){
- for (int i = pow(10, a-1); i < pow(10, a); i++) if (i%b == 0) cout << i << " ";
- }
Advertisement
Add Comment
Please, Sign In to add comment