Advertisement
Josif_tepe

Untitled

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