Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Programming Exam for Engineers

The document contains instructions for 3 programming problems for a final exam: 1) Create a program to input array elements and sort from highest to lowest. 2) Create a program to input array elements and sort from lowest to highest. 3) Write a program to input array elements and output the reverse of the array. Sample input/output is provided for each problem.

Uploaded by

Ian Bagunas
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)
43 views1 page

Programming Exam for Engineers

The document contains instructions for 3 programming problems for a final exam: 1) Create a program to input array elements and sort from highest to lowest. 2) Create a program to input array elements and sort from lowest to highest. 3) Write a program to input array elements and output the reverse of the array. Sample input/output is provided for each problem.

Uploaded by

Ian Bagunas
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

Final Exam

EST 120 – Computer Programming for Engineering Technologists

Name: ________________________________________________________

1. Create a program that will input elements in array and will sort the elements in an array from highest to lowest
value. Note: The number of elements may depend on the value entered. The number of elements should be at least
5.

Sample Output:

Enter the number of integers: 5


Enter number 1: 17
Enter number 2: 5
Enter number 3: 35
Enter number 4: 22
Enter number 5: 10

Sorting...

35 22 17 10 5

2. Create a program that will input elements in array and will sort the elements in an array from lowest to highest
value. Note: The number of elements may depend on the value entered. The number of elements should be at least
5.

Sample Output:

Enter the number of integers: 6


Enter number 1: 17
Enter number 2: 5
Enter number 3: 35
Enter number 4: 22
Enter number 5: 10
Enter number 6: 60

Sorting...

5 10 17 22 35 60

3. Write a C program to input elements in array and find reverse of the array.

Sample Output:

Input:

Input array elements: 10, 5, 16, 35, 500

Output:

Array elements after reverse: 500, 35, 16, 5, 10

You might also like