Professional Documents
Culture Documents
Assignment 2. Functions: Last Date: - 17/09/2014
Assignment 2. Functions: Last Date: - 17/09/2014
FUNCTIONS
Last Date: - 17/09/2014
Batch B1
P1. Write a C++ program to print the reverse of a 5 digit number using function with
no argument and no return value.
P2. Write a C++ program to display the multiplication table of a number using function with argument
and no return value.
P3. Write a C++ program to enter 2 integer values and return the sum of these two numbers using
Function with argument and with return value.
P4. Write a C++ program to find the factorial of a number using recursive functions.
P5. Write a C++ program to enter 10 numbers using an array and function and display.
Batch B2
P1. Write a C++ program to print the prime numbers from 1 to 100 using function with
no argument and no return value.
P2. Write a C++ program to display the volume of cylinder using function with argument
and no return value.
P3. Write a C++ program to enter 2 float values and return the average of these two numbers using
Function with argument and with return value.
P4. Write a C++ program to find the factorial of a number using recursive functions.
P5. Write a C++ program to find the area of circle using function with default argument. Take the
default argument as pie=3.14.
Batch B3
P1. Write a C++ program to swap two numbers using function with no argument and no return value.
P2. Write a C++ program to display the power x^y of a number using function with argument
and no return value.
P3. Write a C++ program to find the volume of cylinder using Function with argument and with return
value.
P4. Write a C++ program to find the factorial of a number using recursive functions.
P5. Write a C++ program to enter 10 numbers using an array and function and display.