📌  相关文章
📜  在 C# 中查找数字的最后一位 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:40.431000             🧑  作者: Mango

代码示例1
Console.WriteLine("Please write your number:");
        long n = long.Parse(Console.ReadLine());
 
        long lastDigit = n % (10);  //or int or double - whatever numeral data type suits you
        Console.WriteLine("The last digit of your number {0} is: {1}", n, lastDigit);