0% found this document useful (0 votes)
32 views3 pages

Programming Fundamentals Exam

The document outlines the final exam for the Fundamentals of Programming course, detailing instructions, exam duration, and prohibited materials. It includes programming tasks such as creating a C++ program to manage student data, developing an access key algorithm, and implementing functions to check for perfect numbers. Additionally, it provides a procedure for taking the exam in computer labs, including login instructions and file submission guidelines.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views3 pages

Programming Fundamentals Exam

The document outlines the final exam for the Fundamentals of Programming course, detailing instructions, exam duration, and prohibited materials. It includes programming tasks such as creating a C++ program to manage student data, developing an access key algorithm, and implementing functions to check for perfect numbers. Additionally, it provides a procedure for taking the exam in computer labs, including login instructions and file submission guidelines.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Faculty of Engineering

Industrial and Commercial Engineering


-------------------------------------------------------------------------------------------
FUNDAMENTALS OF PROGRAMMING
FINAL EXAM 2015-II

Teachers : Pedro Pablo Rosales / Juan José Flores / Félix Huari


Block Everyone
Duration 100 minutes

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

2. Develop the Access Key algorithm using a flowchart. The algorithm in


First, generate 100 security keys randomly, composed of 4 digits.
Secondly, the algorithm asks the user to enter their access key via the keyboard.
If the key entered by the user is among the 100 keys generated in the form
randomly, the algorithm displays the message on screen; 'OK. Correct key'. If the key does not
It is correct, the algorithm shows the message; 'ERROR. Please try again.'
The algorithm allows three attempts from the user. After the user's third attempt, the
algorithm shows the message; 'Key Blocked'. Thirdly, the algorithm ends,
after the message; "OK. Correct key" or "Key Blocked", displaying on screen, the
number of attempts made by the user.
(6 Points)

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

PROCEDURE TO TAKE EXAM IN THE COMPUTER LABS

Start of the Exam


Each student must log into the virtual campus using the username:
Exam CUE number and as Password: Exam CUE number. By
ejemplo: Usuario: CUE98765, Password: CUE98765,
Remember not to log in with your usual username of name and surname.
please put your first and last name as this will void your exam.
If you are unable to enter, please inform the exam supervisor.
Once they entered the Virtual Campus, check that they can visualize
the FinalExam Task.

During the Exam


You must save all the exam files in the D:\ drive.
from the My Documents folder (it is recommended to save constantly
his work).
Make sure that all the files requested in the exam are
recorded in its final version 10 minutes before the exam ended,
in the folder indicated in the previous step.

At the end of the exam


The exam was developed in a single file: For safety, at least 10.
minutes before the exam ends upload the file to the assignment of
Final Exam of the Virtual Campus.
The exam was developed in several files: For precaution at least 10
minutes before completing the exam you must package or compress the
folder with the exam content in a ZIP file and then upload it to
the FinalExam Task of the virtual campus. It will use as its name
zipped file the number of the CUE. For example: [Link]

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.

place to file a complaint in case an incorrect exam file was uploaded


to the Virtual Campus.

It is the student's responsibility to verify that the file sent to the assignment
Final Exam corresponds to your exam.

You might also like