Template:Cipher

维基百科,自由的百科全书
文档图示 模板文档

此模板从最多12位的数字中提取一位数。

用法

{{Cipher|{{{1}}}|{{{2}}}}}

第一个参数是一个整数,第二个是需提取数字的位数,从右到左计数(1,2,以此类推)。

若超过了设定的位数,返回0。

例子

{{Cipher|9876543210|0}}得到0。

{{Cipher|9876543210|9}}得到9。

{{Cipher|123456789|0}}得到9。

{{Cipher|123456789|8}}得到1。

{{Cipher|432109876543210|12}}得到2。

{{Cipher|432109876543210|13}}得到0!

注意

This template is used by templates with mathematical terms and therefore appears to be integrated in very few pages.