Submission due: Thursday, Dec. 17, 11:59 p.m.
Note: 1. Submission only via E-CLASS is acceptable (If you have any issue with E-CLASS, Please consult IT Dept. )
2. Comments should be included in your source code; otherwise, your mark will be ZERO!!
3. Do not plagiarize on doing your work, if we catch student doing so, he/she will get ZERO for the Assignment.
Lab Assignments – Object Oriented Programming 1
Lab Assignment -8
1. Calculate the x y using tail recursion.
{Hint: Write recursive function to calculate x to the power y)
2. Find sum of natural numbers using recursion
{Hint: Find sum 1+2+3+4+5+6……….+n
Using recursion.
Ask Input n form user.
}
3. Display Fibonacci Series Using Recursion.
{Write a recursive function to Display Fibobacci Series upto n terms.
Ask Input n form user.
}
4. Find G.C.D for two integers using recursion
{
The greatest common divisor (GCD), of two numbers is the largest number that divides them both. For instance, the greatest common factor of 20 and 15 is 5, since 5 divides both 20 and 15 and no larger number has this property. }
Do'stlaringiz bilan baham: |