Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int DZIELNIKI(int n);
- int main(){
- DZIELNIKI(4);
- DZIELNIKI(40);
- DZIELNIKI(51);
- DZIELNIKI(412);
- }
- int DZIELNIKI(int n){
- for (int i = 1; i <= n; i++) if (n%i == 0) cout << i << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment