Advertisement
Josif_tepe

Untitled

Dec 10th, 2022
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int rekurzija(int x) {
  4.     int broj_na_deliteli = 0;
  5.     for(int i = 1; i <= x; i++) {
  6.         if(x % i == 0) {
  7.             broj_na_deliteli++;
  8.         }
  9.     }
  10.     if(broj_na_deliteli >= 5) {
  11.         return x;
  12.     }
  13.     return rekurzija(x + 1);
  14. }
  15. int main() {
  16.     int n;
  17.     scanf("%d", &n);
  18.  
  19.     printf("%d\n", rekurzija(n + 1));
  20.     return 0;
  21. }
  22. /*
  23.  
  24.  */
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement