JakubKaczmarek_123

zadanie 9

Jan 29th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. #include <math.h>
  4. using namespace std;
  5. int DZIELNIKI(int n);
  6. int main(){
  7. DZIELNIKI(4);
  8. DZIELNIKI(40);
  9. DZIELNIKI(51);
  10. DZIELNIKI(412);
  11. }
  12. int DZIELNIKI(int n){
  13.     for (int i = 1; i <= n; i++) if (n%i == 0) cout << i << endl;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment