There is no sense doing digit = something and digits = something else. You always get something else. Delete the red line.
Code:
printf("enter digit");
scanf("%d",&digit);
do
{
sumb += digit % 10;
digit=digit-digit%10;
digit = digit / 10;
}while(digit / 10 >1);
printf("%d",sumb);
So you get the first part. The sum of all digits. Now you need to do the same method with sumb. So, make a function with your algorithm in which you will pass digits. Then use a loop with the function.
Code:
int sumDigits(int digit) {... return sumb}
int main()
{
int result = 0;
...
for (...) {
...
result = sumDigits(...)
}
printf("Sum =%d", 23);
}