#include<stdio.h>
int main(){
    int n=2344,first=0,last=0,sum=0;
    last=n%10;
     sum=sum+last;
    first=n;
   while(first >= 10)
    {
        first = first / 10;
    } 
  sum=sum+first;
  printf("Sum =%d",sum);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: