Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,b,mini=1, maks, reszta;
- void PODZIELNOSC(int a, int b){
- for (int z = 1; z<a; z++){
- mini = mini * 10;
- }
- maks=(mini*10)-1;
- for(int i = mini; i < maks; i++){
- reszta=i%b;
- if(reszta==0){
- cout << i <<", ";
- }
- else{
- }
- }
- }
- int main()
- {
- cout << "Podaj ilu cyfrowe liczby nas interesuja: " << endl;
- cin >> a;
- cout << "Podaj dzielnik: " << endl;
- cin >> b;
- PODZIELNOSC(a,b);
- return 0;
- }
Add Comment
Please, Sign In to add comment