Question: (1) Write a recursive function in C++ programming to calculate sum of digits of a number. How to calculate sum of digits of a given

(1)

Write a recursive function in C++ programming to calculate sum of digits of a number. How to calculate sum of digits of a given number using recursion in C++ program. Logic to find sum of digits using recursion in C++ programming.

Example

Input

Input number: 1234

Output

Sum of digits: 10

(2)

Write a recursive function in C++ programming to find reverse of a number. How to find reverse of a number in C++ programming using recursion. Logic to find reverse of a number using recursion in C++ programming.

Example

Input

Input number: 12345

Output

Reverse: 54321

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!