In this assignment, we want to test our knowledge on recursion and use it to solve two problems.   1- Symmetric Strings A number is said to be symmetric if it is read the same in both forward and...

In this assignment, we want to test our knowledge on recursion and use it to solve two problems.


1- Symmetric Strings A number is said to be symmetric if it is read the same in both forward and backward ways. Write a recursive program to check if a given number is symmetric. Your program should print either Symmetric or Asymmetric as its output. See some examples below:


Input:  123321  12321   1231   1


Output: Symmetric  Symmetric  Asymmetric  Symmetric


You should get the input number from user.



2- Ladder Someone wants to go up a ladder. Each time, they have the option to either go to the next rung or skip the next rung and go to the next next rung. So, either one rung at a time or two rungs at a time. Write a recursive program that computes the number of possible ways that a person can move up the ladder. You should get number of rungs of the ladder from the user.







May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here