Question 7

OCR Computer Science June 2025 Algorithms and problem solving (H046-02)AS8 marks

On the specification

2.2 Problem solving and programming2.3 Algorithms
Question text

7 Write an algorithm, using program code or pseudocode to: • take a user’s date of birth as a string input in the format DD/MM/YYYY • take a year as input from the user in the format YYYY • output the age the user will be on their birthday in the year input in the format: You will be 18 on the 1 January 2029 You can use the function getMonth() to convert a 2-digit month into a string. For example: getMonth(02) will return "February". You do not need to check the inputs are in the correct format. You should assume the year entered will always be in the future. [8]