We appreciate your visit to Create a program in C that prompts a user to enter a login name and password The correct login name is Admin and the correct. This page offers clear insights and highlights the essential aspects of the topic. Our goal is to provide a helpful and engaging learning experience. Explore the content and find the answers you need!

Create a program in C that prompts a user to enter a login name and password. The correct login name is "Admin," and the correct password is "PASS."

- If both the login name and password are correct, display "Correct Login" to the console window.
- If the login name or password is incorrect, display what is wrong to the console window. For example, indicate "wrong username," "wrong password," or "both."

Answer :

Answer:

Answered below.

Explanation:

//Program in Python

login_name = "Admin"

password = "PASS"

display = " "

user_login_name = input ("Enter username: ")

user_password = input("Enter your Password: ")

if user_login_name == login_name and user_password == password:

display = "Correct Login"

elif user_login_name != login_name:

display = "wrong username"

elif user_password != password:

display = "wrong password"

print(display)

Thanks for taking the time to read Create a program in C that prompts a user to enter a login name and password The correct login name is Admin and the correct. We hope the insights shared have been valuable and enhanced your understanding of the topic. Don�t hesitate to browse our website for more informative and engaging content!

Rewritten by : Barada