C: how to break apart a multi digit number into separate variables? May 13, 2023 by Tarik int value = 123; while (value > 0) { int digit = value % 10; // do something with digit value /= 10; }