Question: Need help argent Question 3 12 points Save Answer Write a C++ program that defines and tests a function sumDigits(int n) that takes as an
Need help argent

Question 3 12 points Save Answer Write a C++ program that defines and tests a function sumDigits(int n) that takes as an argument a positive integer n and returns the sum of all the digits of n. Print both n and the sum of the digits. Your output should have the same format as the sample shown and should work for any positive integer a user enters. SAMPLE OUTPUT The value of n is: 257 The sum of all the digits is: 14 T T T Arial 3 (12pt) T Ili III 85 3:50 N IL 2/11/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
