Photo AI

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 icon

Question 6

Write-a-VB.Net-program-that-inputs-a-password-and-checks-if-it-is-correct-AQA-GCSE Computer Science-Question 6-2021-Paper 1.png

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

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

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

Answer

Else
    Console.WriteLine("Not welcome")
End If

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;