Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int num,sum=0,first,last;
- printf("enter any number:");
- scanf("%d",&num);
- last=num % 10;
- first=num;
- while(num>=10)
- {
- num=num/10;
- }
- first=num;
- sum=first+last;
- printf("%d",sum);
- return 0;
- }
Add Comment
Please, Sign In to add comment