Ithink there is a problem in variable inv can you check it out
hello @akash_281 here add ‘0’ to convert it to char. inv=9-a[i]+‘0’