0% found this document useful (0 votes)
50 views6 pages

Assignment Course:: Programming Fundamentals Submitted To

This assignment contains 5 programming problems for a Programming Fundamentals course. The problems include: 1) Writing a C++ program to display Fibonacci numbers up to a user-entered number using a function. 2) Writing a program to reverse a user-entered number using a Reverse() function. 3) Writing a function to return the smallest of three floating point numbers. 4) Writing a program to check if original variables are changed when passing one by value and one by reference. 5) Writing a program to find the minimum value in a one-dimensional array passed to a function.

Uploaded by

Samar Shahzad
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)
50 views6 pages

Assignment Course:: Programming Fundamentals Submitted To

This assignment contains 5 programming problems for a Programming Fundamentals course. The problems include: 1) Writing a C++ program to display Fibonacci numbers up to a user-entered number using a function. 2) Writing a program to reverse a user-entered number using a Reverse() function. 3) Writing a function to return the smallest of three floating point numbers. 4) Writing a program to check if original variables are changed when passing one by value and one by reference. 5) Writing a program to find the minimum value in a one-dimensional array passed to a function.

Uploaded by

Samar Shahzad
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/ 6

ASSIGNMENT

Course: Programming Fundamentals

Submitted To:

Mam IQRA ISHAQ

Submitted By:

Samar Shahzad

Roll No:

084

Semester:

1st

Class:

BSCS

Section (Grey)

________________________________________________
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.

You might also like