Academic Year 2019/20: P21387 Introduction To Algorithms and Programming
Academic Year 2019/20: P21387 Introduction To Algorithms and Programming
Deadline for Submission: Online via the Moodle submission link by 11:00am on Friday 5th June.
Submission Instructions Submit your full source code and pseudo code to the submission link on
the Moodle page.
Instructions for completing the Please upload your full code in a single text file (.txt). Your code must
assessment: be written in C and compliable in Codeblocks.
Write a program that requests the user to search for a single word in the text provided below. Your
program MUST perform exactly as detailed and in the order described for the marks.
1. Require the user to enter the password “ladybird” to gain access to the system
o Use a While Loop which provides the user 3 attempts to gain access to the system.
After 3 unsuccessful attempts, print a message and exit the program.
2. Display a menu-based system which offers the user a choice of 1) start the program or 2) exit
o If the user presses 1
▪ Request the user to confirm they are ready to begin by typing yes or no
• Any input other than “yes”, “YES” or “no”, “NO” should be rejected.
▪ Call the function named wordSearch (see Part 2 below)
o If the user presses 2
▪ Exit the system indicating successful exit status
o If the user presses anything else other than 1 or 2
▪ Print a message to say that input is not allowed
▪ Go to the main menu (step 2)
• You cannot use a goto label
Complete pseudo code of the solution must be written at the top program source code and must
enclosed with source code comments delimiters.
Pseudo code not properly commented out will be subject to a 2-mark penalty.
Finally:
• The program may be able to be written in different IDEs but must be compliable with
CodeBlocks.
• The code must be written in C and not any other language such as C++
• Please upload ALL your work in one single .txt document to the Moodle submission link by
the deadline.