#include <stdio.h>
int main(){
int num, lastdigit,newnum;
printf("Enter a number: ");
scanf("%d", &num);
lastdigit = num%10;
newnum = num/10;
printf("Last digit = %d\n", lastdigit);
printf("The new number = %d\n", newnum);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: