answersLogoWhite

0


Best Answer

#include <iostream>

#include <string>

#include <windows.h>

using namespace std;

int main()

{

string password;

int chances = 3;

cout << "Enter password: ";

while(chances != 0)

{

cin >> password;

if(password 0)

{

for(int i = 3; i >= 0; i--)

{

cout << "To many wrong answers... Terminating in " << i << endl;

Sleep(1000);

}

return 0;

}

char wait;

cin >> wait;

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C plus plus program that reads a password and prints okay If the correct password is entered print okay otherwise print sorry The user should be given three chances to type the password?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you do if your gmail account has problems and it says imap incorrect verify that password or username is correct?

You must have entered incorrect ID or password. Gmail does not tell which one because of privacy. You have to enter the correct details again.


How can you make your computer restart if the wrong password is entered to log on?

I don't understand your question. The first answer that comes to mind is to enter the correct password, but surly that's not what you meant. If you mean you entered the wrong password so many times it locked you out, but you now think you know the password, you can try removing power and restarting. If these weren't what you meant try re-asking your question.


What does case sensitive?

This term typically applies to passwords. So if your password is WiKkI, then it needs to be entered exactly like it was when it was set up. Any letters that are capitalized must be entered as capitals otherwise it won't work.


Why is your ipod touch saying its disable?

Because you probably entered the password wrong to many times if has one set. Just reconnect it to iTunes, and it should give you more chances.


How do you get into acuity?

you need a name and password which will be entered into the username and password boxes.


How do you make a login using PHP?

Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.


What does password mismatch mean?

It means that your logon name and your password (as you entered it) do not match. You entered an unintended typo.


What is grammatically correct - my company has entered into or my company have entered into?

My company has entered into.....


When your i pod touch says your password was entered incorrectly what do you do?

Retry your password. You may have typed it in wrong.


Facebook you can not sign on?

If you already have an account and you can no longer log in and you know you entered the correct password and email address, you account has most likely been disabled.


Which is correct sentence structure you have entered the room or you have enter the room?

You have entered the room.


Is the sentence 'I entered into the classroom' is correct?

Yes, but leave out into is better.I entered the classroom.