Problem Description
Develop a C program that does the following:
1. Declare an integer variable called num1. Read in the num1.
2. Generate a random number between 2 and 20 called num2.
3. Create a function named sumDigit that receives num1 x num2 and recursively computes and returns the sum of digits of num1 x num2.
4. Ask the user to input the result of the sum of num1 x num2 digits.
5. Compare the computed multiplication result to the user's answer. If the user's answer is incorrect, the user is allowed to keep trying until the correct answer is entered.
6. Ask the user if he/she would like to continue trying other numbers. If the user enters 'Y', the computer generates another random number. Otherwise, the program ends.
Sample Output
Enter an integer: 5
What is the sum of 90 digits? 9
Correct!
Do you want to try another number? ('Y': Yes, 'N': No) Y
What is the sum of 10 digits? 3
Not correct, try again!
What is the sum of 10 digits? 1
Correct!
Do you want to try another number? ('Y': Yes, 'N': No) N
What is the sum of 50 digits? 5
Correct!
Do you want to try another number? ('Y': Yes, 'N': No) N
What is the sum of 95 digits? 6
Not correct, try again!
What is the sum of 95 digits? 13
Not correct, try again!
What is the sum of 95 digits? 14
Correct!
Do you want to try another number? ('Y': Yes, 'N': No) N