Question: Data Structure Lab Subject: Recursion. Lab Objectives : Use recursion method. Exercise : Write a java program that reads an integer positive number and :
Data Structure Lab
Subject: Recursion.
Lab Objectives:
Use recursion method.
Exercise:
- Write a java program that reads an integer positive number and :
- Call a method that calculates and returns the factorial of the number iteratively.
- Call a method that calculates and returns the factorial of the number recursively.
- Write a java program that reads a string from the user and :
- Call a method that prints the string iteratively in reverse order.
- Call a method that prints the string recursively in reverse order.
All in the main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
