#include <stdio.h>
int main()
{
int num, fd, ld, sum;
printf("Enter a number: ");
scanf("%d", &num);
ld = num % 10;
while (num >= 10)
{
num /= 10;
}
fd = num;
sum = fd + ld;
printf("Sum of first and last digit: %d\n", sum);
return 0;
}