In: Computer Science
I have attached the pictures of the code.
In the Question it is not specified in which language.So I wrote the code in three different popular Languages(C,Python,JAVA).And I Have Displayed a "WRONG INPUT" message if the number entered by the user is negative.
I have given a simple statement about RECURSION.And used note points and comments when needed.
JAVA Code:
PYTHON code:
if you need any further info please ask you using comments
Have A Great Day!