find the last digit f th enumber (1! + 2! + 3!) code example
Example 1: code to find the last digit of a number
int n;
cout<<"Enter the number";
cin>>n;
int LD= n % 10;
cout<<LD<<endl;
Example 2: find last digit of number
//C++
int last_digit = number % 10;