Program to Find Sum of a Number Excluding First and Last Digits
#include
void main(){int n,num,x,sum=0,count=0,a,last,first,multiple=1;printf("Enter a number: ");scanf("%d",&n);a=n;
//finding the sum of the digitswhile(n>0){x=n%10;sum=sum+x;n=n/10;count++;}
0 comments:
Post a Comment