Assignment V

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Assignment V

1. Write a recursive function to print binary code of an integer


(Hint: If the input is 10 its equivalent binary code is 1010, use the modulus and division
operator)
2. Write a recursive function which takes an integer as argument and print the same vertically such
as that one digit of it is printed in one line. For example, if we have given 1976 as input, the
output should be
1
9
7
6
(Hint: use modulus and division operator)
3. Write a recursive function to calculate nth term in sinh series for a given value of x

x-x3/3!+x5/5!-x7/7!+.. n terms
4. Write a recursive function to calculate the sum of prime numbers between 1 to 100.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy