0% found this document useful (0 votes)
21 views

Lab-4 Task

Uploaded by

mianabdullah6747
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Lab-4 Task

Uploaded by

mianabdullah6747
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Programming Fundamentals

Lab – 4
1. Write a function to find first and last digit number in 10 digits array.

2. Write a function to get 10 numbers using array and find sum of all elements.

3. Write a function to get 10 numbers using array and find the average of all elements.

4. Write a function to get 10 numbers using array and find the maximum and minimum.

5. Write a function to get 10 numbers using array and reverse the elements.

6. Write a function to find and count the repeated element in an array.

7. Write a function to find the second highest element in an array.

8. Write a function to check if an array is a palindrome.

9. Write a function to get 10 numbers array and give options with menu function for

ascending or descending order.

10. Write a function to get 10 numbers and perform binary search on a sorted array.

11. Write a function to get 2 arrays of 10 elements and sort in ascending order then

merge into third array.

12. Write a function to find the missing number in a 5 sequenced array of integers.

13. Create a program to manage student records, including adding, editing, and

searching records.

14. Write a function called "grade" that takes a student's percentage as a parameter and

returns the letter grade using 2D array of grade and numbers range. (e.g. 90-100 is an

A, 80-89 is a B, etc.). Then, write a main function that prompts the user to input a

percentage and calls the "grade" function to find and print the corresponding letter

grade.

Implement a program to find the sum of elements of each row and each column of a

2D array.

15. Implement a program to check if a 2D array is a magic square (the sum of each row,

column, and diagonal is the same).

You might also like