Question: Question 9 (25p): Write a recursive function, nameComparitor(inputString1, inputString2), which accepts two parameters containing string values and returns an integer based on the comparison below

Question 9 (25p): Write a recursive function, nameComparitor(inputString1, inputString2), which accepts two parameters containing string values and returns an integer based on the comparison below

Question 9 (25p): Write a recursive function, nameComparitor(inputString1, inputString2), which accepts two

Question 9 (25p): Write a recursive function, nameComparitor(inputString1, inputString2), which accepts two parameters containing string values and returns an integer based on the comparison below: If the character of the first string is greater than the character of the second string, add 1 If the character of the first string is lesser than the character of the second string, subtract 1 If the character of the first string is the same as the character of the second string, add by 5 If any of the string does not contain characters anymore, do not do anything. For example, if we As an example: First Variable ("Arun") Second Variable("Brian)" wordCount A B -1 r +5 u +1 n a +1 n 0 output = 6 Test your function with your first name and last name. Place a screenshot of the code output after your code (5 points). For example, if your name is Arun Brian, you will need to place a screenshot similar to this: Name is : Arun Brian Name comparision result is: is: 6

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!