3. Write a program to have following functions :