标签: c# .net algorithm math
可能重复: Get the seventh digit from an integer
我有一个整数,我想要一个对号。
var myDigit = 2345346792;
我需要myDigit中的第5和第6个数字,即34。
在不使用子字符串的情况下获取它们的数学方法是什么?
我之前的帖子中的其他问题: Get the seventh digit from an integer
答案 0 :(得分:1)
重复您之前的解决方案,使用100代替10获取模数并调整除法。
100
10