#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+CgppbnQgbWFpbiAoKQp7CmludCBzdW09MCwgaT0wLCBqLCBwb3M9MDsKY2hhciBpc2JuWzEwXTsKZ2V0cyhpc2JuKTsKd2hpbGUgKGlzYm5bcG9zXSkgewoJaSsrOwoJaiA9IGlzYm5bcG9zXS0nMCc7CglpZiAoaSA8IDEwKQoJCXN1bSArPSBqKmk7Cglwb3MrKzsKLy8JCXByaW50Zigibj0lZFxuIixqKTsKCX0KaWYgKGogPT0gc3VtICUgMTEpCnByaW50ZiAoIktvZCBJU0JOIGtvcnJla3RlblxuIik7CmVsc2UKcHJpbnRmICgiS29kIElTQk4gTkVrb3JyZWt0ZW5cbiIpOwoKcmV0dXJuIDA7IAp9