Josif_tepe

Untitled

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