#include <stdio.h>
int main ()
{
int sum=0, i=0, j, pos=0;
char isbn[10];
while (isbn[pos]) {
i++;
j = isbn[pos]-'0';
if (i < 10)
sum += j*i;
pos++;
//printf("n=%d\n",j);
}
if (j == sum % 11)
printf ("Kod ISBN korrekten\n"); else
printf ("Kod ISBN NEkorrekten\n");
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbiAoKQp7CglpbnQgc3VtPTAsIGk9MCwgaiwgcG9zPTA7CgljaGFyIGlzYm5bMTBdOwoJZ2V0cyhpc2JuKTsKCXdoaWxlIChpc2JuW3Bvc10pIHsKCQlpKys7CgkJaiA9IGlzYm5bcG9zXS0nMCc7CgkJaWYgKGkgPCAxMCkKCQkJc3VtICs9IGoqaTsKCQlwb3MrKzsKCQkvL3ByaW50Zigibj0lZFxuIixqKTsKCX0KCQoJaWYgKGogPT0gc3VtICUgMTEpCgkJcHJpbnRmICgiS29kIElTQk4ga29ycmVrdGVuXG4iKTsKCWVsc2UKCQlwcmludGYgKCJLb2QgSVNCTiBORWtvcnJla3RlblxuIik7CgpyZXR1cm4gMDsgCn0=