Advertisement
josiftepe

Untitled

Nov 14th, 2021
646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int funkcija(int a){
  4.     int posledna,pretposledna;
  5.     while(a>9){
  6.     posledna=a%10;
  7.     pretposledna=(a/10)%10;
  8.         a=a/10;
  9.         if((pretposledna%posledna)!=0)
  10.             return 0;
  11.            
  12.     }
  13.     return 1;
  14. }
  15.  
  16. int main(){
  17.     int broj;
  18.     scanf("%d", &broj);
  19.     funkcija(broj);
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement