Arithmatic Operation
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 digit from the integer. For example, if N is the integer 876543 then n/1000%10 is its thousands digit 6. << Go to Index Page >>