#29279: 測資1 4 8沒過得看這裡, 其實只需要了解一個小地方


harry24991463@gmail.com (呂紹瑋)


   int stored = sum + check[begin] ;

  stored = 10 - ( stored % 10 ) ;

  if ( stored == 10 )

    stored = 0 ;

 

sum是後8碼所得出

check存著26個字母所代表的數字

stored為最終的加總

此時你算出的檢查碼若為10,要將它設為0,因為檢查碼只有一位數,題目上都有寫到,大家要看清楚了~

#30500: Re: 測資1 4 8沒過得看這裡, 其實只需要了解一個小地方


tinakga920029@gmail.com (云婷)


   int stored = sum + check[begin] ;

  stored = 10 - ( stored % 10 ) ;

  if ( stored == 10 )

    stored = 0 ;

 

sum是後8碼所得出

check存著26個字母所代表的數字

stored為最終的加總

此時你算出的檢查碼若為10,要將它設為0,因為檢查碼只有一位數,題目上都有寫到,大家要看清楚了~

推推 卡這裡卡超久,後來發現題目沒看懂的我!