Q1. Simple Output Procedure (4 marks)
Write a procedure named DisplayWelcome that displays the message “Welcome to Computer Science”.
Show how the procedure is called from the main program.
Q2. Procedure with Parameters (6 marks)
Write a procedure named DisplayTotal that:
-
Accepts two integer parameters
-
Calculates their sum
-
Displays the result
Show a suitable procedure call.
Q3. Procedure for Validation (7 marks)
Write a procedure named CheckAge that:
-
Accepts a person’s age as a parameter
-
Displays “Eligible” if the age is 18 or above
-
Displays “Not Eligible” otherwise
Q4. Procedure Using a Loop (8 marks)
Write a procedure named PrintNumbers that:
-
Accepts an integer parameter
N -
Uses a loop to display numbers from 1 to N
Q5. Procedure Using an Array (10 marks)
Write a procedure named DisplayArray that:
-
Accepts an array of integers and its size as parameters
-
Displays all elements of the array using a loop
Exam Reminder for 2210 Students
-
Procedures do not return a value
-
Use parameters correctly
-
Clearly show the procedure call
-
Use correct pseudocode structure
