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