i’m trying to sort int so i can get the last digit from the given combination:
for example user inputs 123 i want to separate 3 so i can do mathematical operations on that int like add 3 to some other number.
Console.WriteLine("Enter the number combination"); string numbers = Convert.ToString(Console.ReadLine()); int last_number = Convert.ToInt32(numbers[numbers.Length - 1]); Console.WriteLine(last_number);
but its returning 52 etc. something like that, is there any other way? or am i doing it wrong.
but most of all why is returning numbers around 50 why not a single digit.