do while loop keeps looping
Hi, Im working on a program and im trying to use a do while loop in it. My only issue is that the loop never ends, it keeps going and going and I thought I had it right. Can anyone see a problem with it? The first time the loop goes around and I get the answer I want, but it just keeps spitting out that answer until I force quit the program.
Code:
do
{
removed = number2/10;
digit = removed % 10;
product = digit*number1;
printf("+ %d", product);
} while (digit != '\0');
Im not sure if I need to post the rest of the code to diagnose, but let me know if thats needed.