Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 please, Program C Problem 1 (Easy) Use while loop to write a program that asks user to enter an username, let's say root.

Problem 2 please, Program C image text in transcribed
Problem 1 (Easy) Use while loop to write a program that asks user to enter an username, let's say root. .If user enters this username, and program asks user to enter user's password. Predefine it in your code and let it be 12345 o If user enters correct password 12345, displays "Logged in." o Otherwise, it tells user "Wrong password." If user enters a name other than root, displays a message showing that "Username doesn't exist" and then loop again that means program starts over so user needs to do all above steps again. Clarification: 1. 2. Program repeats forever until user finally enters correct information. If you change predefined username and password values: root and 12345 to different values (in code), program works for new values. Program 2 (Easy) Modify Program 1 code so user only can enter wrong username and password together for maximum of three times. After third time of trial, user still enter invalid information, display "Your address is banned." Let's use simple rule to define entering invalid information: when user enters wron g password, it ou one invalid information

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

22. Why is tPA not helpful in cases of hemorrhagepg78

Answered: 1 week ago