Advertisement
Josif_tepe

Untitled

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