Code:
iTotal=0; /*clear iTotal*/
iISBN[i]=cISBN[i]-48; /*turn ASCII numbers to base 10 for doing the arithmetic part next*/
iTotal+=iISBN[i]*(i+1); /*times the element by 'it's position + 1', since ISBN weighting values are 1,2,3,4,5,6,7,8,9 and initial i is 0, and add it to iTotal*/
iCheck=0; /*clear iCheck*/
iCheck=iTotal%11; /*iCheck becomes the remainder of iTotal divided by 11, ISBN uses mod 11*/
cout<<(iCheck); /*output iCheck, the remainder aka the ISBN check digit, and I used cout because printf gave me errors*/
So, what is wrong in my calculations