Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int funkcija(int a){
- int posledna,pretposledna;
- while(a>9){
- posledna=a%10;
- pretposledna=(a/10)%10;
- a=a/10;
- if((pretposledna%posledna)!=0)
- return 0;
- }
- return 1;
- }
- int funkcija2(int b){
- int posledna2,pretposledna2;
- while(b>9){
- posledna2=b%10;
- b=b/10;
- pretposledna2=b%10;
- if((pretposledna2<posledna2)!=0)
- return 0;
- }
- return 1;
- }
- int main(){
- int broj;
- scanf("%d", &broj);
- printf("%d", funkcija(broj));
- printf("%d", funkcija2(broj));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement