#include<stdio.h>
int main(){
int n=2344,first=0,last=0;
last=n%10;
first=n;
while(first >= 10)
{
first = first / 10;
}
printf("first dig=%d",first);
printf("Last dig =%d",last);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: