#include <stdio.h>
int main()
{
int input, firstNumber, lastNumber;
printf("Enter number : ");
scanf("%d", &input);
{
int input, firstNumber, lastNumber;
printf("Enter number : ");
scanf("%d", &input);
lastNumber = input % 10;
firstNumber = input;
firstNumber = input;
while (firstNumber >= 10)
firstNumber /= 10;
firstNumber /= 10;
printf("Addition of first and last number , %d + %d = %d",
firstNumber, lastNumber, firstNumber + lastNumber);
firstNumber, lastNumber, firstNumber + lastNumber);
return 0;
}
}
Output :
Enter number : 1234 Addition of first and last number , 1 + 4 = 5
0 Comments