0% found this document useful (0 votes)
27 views1 page

Assignment 2. Functions: Last Date: - 17/09/2014

This document outlines programming assignments for three batches (B1, B2, B3) involving functions in C++. Each batch contains 5 programming problems (P1-P5) focusing on different aspects of functions such as arguments, return values, recursion, and arrays. Problems include printing the reverse of a number, multiplication tables, calculating sums/averages, factorials, volumes, areas, swapping values, and powers.

Uploaded by

AkashKulkarni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Assignment 2. Functions: Last Date: - 17/09/2014

This document outlines programming assignments for three batches (B1, B2, B3) involving functions in C++. Each batch contains 5 programming problems (P1-P5) focusing on different aspects of functions such as arguments, return values, recursion, and arrays. Problems include printing the reverse of a number, multiplication tables, calculating sums/averages, factorials, volumes, areas, swapping values, and powers.

Uploaded by

AkashKulkarni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT 2.

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.

You might also like