Program to find the last digit of X in base Y | C # Program to find the last digit of X in base Y ; Function to find the last digit of X in base Y ; Driver code
using System ; class GFG { static void last_digit ( int X , int Y ) { Console . Write ( X % Y ) ; } public static void Main ( String [ ] args ) { int X = 55 , Y = 3 ; last_digit ( X , Y ) ; } }