PF Assignment 3
PF Assignment 3
Note:
Assignment will be collected by Deadline 21-01-2025. Assignment should be in hard form.
The print screen of the program’s output should be attached. Copied Code will be rejected
and no marks will be marked for such assignment.
1. Write a C++ program that enters a number from the user and displays Fibonacci numbers
from 1 to given number using function.
2. Write a program that prompts the user to enter a number and reverse it. Write a function
Reverse( ) to reverse the number. For example, if the user enters 2765, the function should
reverse it so that it becomes 5672. The function should accept the number as an input
parameter and return the reverse number.
3. Write a function that returns the smallest of three floating point numbers.
4. Write a program that gets two numbers, one should be passed by value and the other should
be passed by reference and then check the original variables whether their values have been
changed or not.
5. Write a program that inputs five integers in one-dimensional array and passes the array to
function. The function finds the minimum value in the array and returns to main function
where it is displayed.
6. Write a program that inputs values in a 2-D array of 5 columns and 5 rows. It displays these
values using a function display( ). It passes the array to function times2( ) that doubles the
values stored in all elements of array. The program then again displays the changed values of
the array using display( ) function.