Set up a password variable in your C# application and assign a password to this variable.  Run your program and type in invalid passwords to check and see if your boolean logic is correct. Once the correct password is typed, the program should stop asking for input. You should do this by utilizing a while loop or a do while loop.   Sample output is below:   Enter the password :: hello INVALID Enter the password :: hacker INVALID Enter the password :: i INVALID Enter the password :: am INVALID Enter the password :: a INVALID Enter the password :: hacker INVALID Enter the password :: taylor INVALID Enter the password :: go INVALID Enter the password :: swift INVALID Enter the password :: taylorswift INVALID Enter the password :: taylorswiftchiefs INVALID Enter the password :: taylorswiftgoingtothesuperbowl VALID

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.7: Do While Loops
Problem 2E: (Misc. application) a. Write a program that continuously requests a grade to be entered. If the...
icon
Related questions
Question

Set up a password variable in your C# application and assign a password to this variable.  Run your program and type in invalid passwords to check and see if your boolean logic is correct. Once the correct password is typed, the program should stop asking for input. You should do this by utilizing a while loop or a do while loop.

 

Sample output is below:

 

Enter the password :: hello

INVALID

Enter the password :: hacker

INVALID

Enter the password :: i

INVALID

Enter the password :: am

INVALID

Enter the password :: a

INVALID

Enter the password :: hacker

INVALID

Enter the password :: taylor

INVALID

Enter the password :: go

INVALID

Enter the password :: swift

INVALID

Enter the password :: taylorswift

INVALID

Enter the password :: taylorswiftchiefs

INVALID

Enter the password :: taylorswiftgoingtothesuperbowl

VALID

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,