文件名称:UPC
介绍说明--下载内容均来自于网络,请自行研究使用
UPC:下面是一种计算校验位的方法:首先把第一位、第三位、第五位、第七位、第九位和第十一位数字相加。然后把第二位、第四位、第六位、第八位和第十位数字相加。接着把第一次加法结果乘以3后再加上第二次加法的结果。随后,再把上述结果减去1。减法后的结果除以10取余数。最后,用9减去上一步骤中得到的余数。
输入
每次输入三行数据,第一行是UPC的第一位数字,第二行是UPC的第一组五位数字,第三行是UPC的第二组五位数字。
输出
UPC的校验位(Below UPC: is a method of calculating the checkout bit: first, the first, third, fifth, seventh, ninth, and eleventh digit numbers are added. Then add second, fourth, sixth, eighth, and tenth digits. Then the first addition result is multiplied by 3 and then added with the result of second additions. Then, the above results were subtracted from 1. The result after the subtraction is divided by 10 to take the remainder. Finally, the remainder obtained in the last step is subtracted with 9.
input
Each time input three lines of data, the first line is the first number of UPC, the second line is the first set of five digit numbers of the UPC, and the third line is the second group of five digit numbers of the UPC.
output
Check bits of UPC)
输入
每次输入三行数据,第一行是UPC的第一位数字,第二行是UPC的第一组五位数字,第三行是UPC的第二组五位数字。
输出
UPC的校验位(Below UPC: is a method of calculating the checkout bit: first, the first, third, fifth, seventh, ninth, and eleventh digit numbers are added. Then add second, fourth, sixth, eighth, and tenth digits. Then the first addition result is multiplied by 3 and then added with the result of second additions. Then, the above results were subtracted from 1. The result after the subtraction is divided by 10 to take the remainder. Finally, the remainder obtained in the last step is subtracted with 9.
input
Each time input three lines of data, the first line is the first number of UPC, the second line is the first set of five digit numbers of the UPC, and the third line is the second group of five digit numbers of the UPC.
output
Check bits of UPC)
相关搜索: UPC
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
UPC.c | 488 | 2017-11-16 |
UPC.exe | 131176 | 2017-11-16 |