Question Constellation Sign up for free
Q11.0 7 marks

AQA · GCSE · Computer Science · Higher · Paper 1A Computational thinking and programming skills (C#)

A program is to be written to authenticate a username and password entered by the user. Figure 9 shows the only two pairs of valid usernames and passwords.

Figure 9
UsernamePassword
Yusuf533kk
Mary80af5r

Write a C# program to authenticate a username and password. Get the user to enter both values; display Access denied if the pair is invalid; display Access granted if the pair is valid; and repeat until a valid pair is entered. Use meaningful variable name(s) and C# syntax.

Your answer