Write a VB.Net program that inputs a password and checks if it is correct - AQA - GCSE Computer Science - Question 6 - 2021 - Paper 1
Question 6
Write a VB.Net program that inputs a password and checks if it is correct.
Your program should work as follows:
- input a password and store it in a suitable varia... show full transcript
Worked Solution & Example Answer:Write a VB.Net program that inputs a password and checks if it is correct - AQA - GCSE Computer Science - Question 6 - 2021 - Paper 1
Step 1
input a password and store it in a suitable variable
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Dim password As String
password = Console.ReadLine()
Step 2
if the password entered is equal to secret, display the message Welcome
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
If password = "secret" Then
Console.WriteLine("Welcome")
Step 3
if the password entered is not equal to secret display the message Not welcome.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!