Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n;
- int br=0;
- while(scanf("%x",&n))
- {
- if(n=='A' || n=='a')
- br+=10;
- else if(n=='B' || n=='b')
- br+=11;
- else if(n=='C' || n=='c')
- br+=12;
- else if(n=='D' || n=='d')
- br+=13;
- else if(n=='E' || n=='e')
- br+=14;
- else if(n=='F' || n=='f')
- br+=15;
- else
- br+=n;
- }
- if(br%16==0&&br%100==16)
- printf("Poln pogodok");
- else if(br%16==0)
- printf("Pogodok");
- else
- printf("%d",br);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement