MarcinKrol

Zad8

Mar 24th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. //Zad8
  4.  
  5. using namespace std;
  6. int a=1,b=1,c,e;
  7. void PODZIELNOSC(int a, int e)
  8. {
  9. for(int i=1; i<=a; i++)
  10. {
  11. b = b*10;
  12. }
  13. c = b/10;
  14.  
  15. for(int j=c; j<b; j++)
  16. {
  17. if(j%e==0)
  18. {
  19. cout<<j<<endl;
  20. }
  21. }
  22. }
  23.  
  24. int main()
  25. {
  26.  
  27. cout<<"Podaj ilocyfrowe maja byc liczby"<<endl;
  28. cin >> a;
  29. cout<<"Podaj przez jaka liczbe maja byc podzielne"<<endl;
  30. cin >> e; //dzielnik
  31. PODZIELNOSC(a,e);
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment