Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,wynik=0,b;
- void DZIELNIK(int a){
- for(int i; i>0; i++){
- wynik=wynik+i;
- b=wynik%a;
- if(b==0){
- cout << wynik <<", ";
- }
- }
- }
- int main()
- {
- cout << "Podaj liczbe: " << endl;
- cin >> a;
- DZIELNIK(a);
- return 0;
- }
Add Comment
Please, Sign In to add comment