Advertisement
damch

heksadekadni cifri

Nov 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int n;
  7. int z=0;
  8. while(scanf("%x",&n))
  9. {
  10. z=z+n;
  11. }
  12.  
  13. if(z>15&&z%16==0 && z%10==6 && z%100/10==1)
  14. {
  15. printf("Poln pogodok");
  16. }
  17. else if(z%16==0)
  18. {
  19. printf("Pogodok");
  20. }
  21.  
  22. else printf("%d",z);
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement