Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Find last digit of a number in c#


        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);
 
Comment

PREVIOUS NEXT
Code Example
Shell :: install nix macos 
Shell :: install mpg321 
Shell :: ubuntu kill service 
Shell :: add user to dialout group 
Shell :: mssql-tools : depends: msodbcsql17 (= 17.3.0.0) but it is not going to be installed 
Shell :: bash check if executable 
Shell :: laravel version global upgrade 
Shell :: role ansible update apt 
Shell :: install microsoft edge terminal 
Shell :: mac see current path7 
Shell :: install nvim 
Shell :: batch escape character 
Shell :: change display resolution on terminal 
Shell :: init jest config 
Shell :: zsh slow in git repo 
Shell :: Permission denied (publickey,keyboard-interactive). 
Shell :: flatpak repo 
Shell :: sh script options 
Shell :: linux update 
Shell :: force remove a hidden folder in linux 
Shell :: cd to root directory windows 
Shell :: composer add git repository 
Shell :: run apache xampp 
Shell :: bash how to convert text to lowercase or uppercase 
Shell :: gui for ubuntu server 
Shell :: xrdp choose desktop environment 
Shell :: git undo unstaged changes to one file 
Shell :: cant-push-to-github-because-of-large-file-which-i-already-deleted 
Shell :: watch tail file linux 
Shell :: Kubernetes configuration file is group readable 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =