Question: they are two exercises please label them ,, do not mix them ,, Exercise 2: Write a program called SumOfDigits that will calculate the sum
they are two exercises please label them ,,
do not mix them ,,
Exercise 2: Write a program called SumOfDigits that will calculate the sum of the digits of the positive integer number. The user should input one positive integer number, and the program should display the sum of its digits. The output of the program should be: Please input a positive integer number N: 2563 Sum of all digits of the number 2563 is: 16 Exercise 3: Write a program for the exercise 2 using recursion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
