JakubKaczmarek_123

zadanie 11

Jan 29th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int PODZIELNOSC(int a, int b);
  5. int main(){
  6. int a, b;
  7. cout << "wprowadz 2 liczby: "<<endl;
  8. cin >> a >> b;
  9. cout << endl;
  10. cout << "Twoje liczby to: ";
  11. PODZIELNOSC(a,b);
  12. }
  13. int PODZIELNOSC(int a, int b){
  14. for (int i = pow(10, a-1); i < pow(10, a); i++) if (i%b == 0) cout << i << " ";
  15. }
Advertisement
Add Comment
Please, Sign In to add comment