Question: write and run a program that reads a six-digit integer and prints the sum of its six digits.Use the quotient operator/ and the remainder operator

write and run a program that reads a six-digit integer and prints the sum of its six digits.Use the quotient operator/ and the remainder operator % to extract the digits from the digits from the integer.For example, if n is the integer 876.543, then n/1000%10 is its thousands digit 6.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!