Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 6

A control system program is to be written to authorize access to a secure server room using a dual-factor login: an Employee ID and a corresponding PIN.

Table 1 shows the only two authorized pairs of Employee IDs and PINs.

Employee IDPIN
Tech4049182
Admin7073546

Write a C# program to authorize access based on the Employee ID and PIN.

The program should:

  • Ask the user to input an Employee ID
  • Ask the user to input a PIN
  • Display the message Entry Denied if the Employee ID and PIN pair entered is not authorized
  • Display the message Entry Approved if the Employee ID and PIN pair entered is authorized
  • Repeat these steps until an authorized Employee ID and PIN pair is entered.

You should use meaningful variable names and correct C# syntax in your answer.

[7]
Markscheme

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank