生成16位数会员卡号列表的校验位 [英] Generating check digit for list of 16 digit loyalty card numbers

查看:94
本文介绍了生成16位数会员卡号列表的校验位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要帮助为我的礼品卡项目创建校验位。

我只能找到检查代码个人号码,但我需要能够为我的卡制作校验位以及通过使用来控制它们。



谢谢!

Hi,

I need help in creating check digit for my gift card project.
I could find only the code for checking individual numbers but I need ability to make check digit for my cards as well as control them through usage.

Thank you!

推荐答案

好吧,你的问题用解决方案标记:Luhn编码。

一个非常快速的谷歌带你去描述它是什么,如何检查它以及如何生成它: http://en.wikipedia.org/wiki/Luhn_algorithm [ ^ ]



它甚至包括必要的伪-code!



不仅如此,我们还做不到:你甚至没有说明你需要用哪种语言编码,所以我们不能提供比伪-code,即使我们想要。
Well, your question is tagged with the solution: Luhn coding.
And a very quick google take you to a description of what it is, how to check it and how to generate it: http://en.wikipedia.org/wiki/Luhn_algorithm[^]

It even includes the necessary pseudo-code!

More than that we cannot do: you don;t even specify what language you need to code it in, so we can't provide more than pseudo-code, even if we wanted to.


这篇关于生成16位数会员卡号列表的校验位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆