Question: Language c++ thank you Write a program that read a four-digit number and print the sum of the digits. Expected output of the program is
Language c++ thank you

Write a program that read a four-digit number and print the sum of the digits. Expected output of the program is as follows: Enter a number of four digits: 4567 Sum of digits is: 126 Hint-1: For example, input a number N= 3467, the output should be 32 +42 +62 + 72 = 110. Hint-2: Use % and operators. *You should test your program using PASS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
