C Programming20745 marksDecision Making and Looping
Write a program that computes the sum of digits of a given integer number.
Write a program that computes the sum of digits of a given integer number. [5]
To find the sum of digits of an integer, we repeatedly extract the last digit using the modulus operator (% 10), add it to a sum variable, and then remove the last digit using integer division (/ 10). This continues until the number becomes 0. Example: For n = 1234 - 1234 % 10 = 4, sum = 4, n = 1...