#include #include // 531 ---> 531 / 10 = 53 // units 1 // tens = 3 // hundreds = 5 int main() { int num; int units, tens, hundreds; printf("Enter a 3-digit number: "); scanf("%d", &num); units = num % 10; tens = (num / 10) % 10; hundreds = num / 100; printf("The total sum of digits in %d is %d\n", num, units + tens + hundreds); return 0; }