Programming Fundamentals Exam
Programming Fundamentals Exam
Instructions
The use of reference materials, copies and/or books is not allowed,
The use of cell phones, tablets, or laptops is not allowed.
The use of calculators is personal.
The test is conducted with a pen.
Before starting the exam, carefully read the ANNEX to this exam and follow it rigorously.
described procedure.
[Link] a C++ program that allows input and storage of codes, names, and grades.
final grades of all the students in a classroom. Use three one-dimensional arrays
(vectors) called codes [ ], names [ ], and grades [ ]. (3 points).
Based on the above information, do the following:
Show the data sorted by names. (3 points).
Calculate and show the final average of the students in the course rounded to two
decimals. (1 point).
Indicate the percentage of students who passed. (1 point).
A number is perfect if the sum of all its divisors except the number itself gives us
as a result the given number. Implement the program using the following
functions and the main function:
ReadNumber. This function allows reading the number, it must validate that it is
positive. (1 point)
Check. - This function returns 1 if the number is perfect, otherwise it returns 0.
(2 points).
Show. This function displays the given number and also the message 'Number is'
perfect"o"Number is not perfect." (2 points).
Implement the main function. (1 point)
Example: n= 6 is a perfect number, its divisors are 1, 2, and 3 whose sum is 6.
1
Faculty of Engineering
Industrial and Commercial Engineering
-------------------------------------------------------------------------------------------
ANNEX
2
School of Engineering
Industrial and Commercial Engineering
-------------------------------------------------------------------------------------------
Take some time to check that your file has been uploaded to the
Final Exam Task and that the file corresponds to your exam and not
you have the wrong file.
Please take into account that all recorded files in the
PCs will be removed at the conclusion of the exam, therefore there are none.
It is the student's responsibility to verify that the file sent to the assignment
Final Exam corresponds to your exam.