Question: 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  Problem 2 please, Program C Problem 1 (Easy) Use while loop

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!