0
Can anyone make the program of password generator with do while
if the user gives the password correct in 3 times then it show else no more password user entered can anyone just give the syntax!!!!!! //i request some of my friend by sending him notification ....i hope u wll give my answer Dan Walker Dev Hans Larry â âââSreejith Helga Fata1 Err0r Arun Tomar HAWKEYE Gaurav Agrawal
6 RĂ©ponses
+ 1
line no. 15: key = 1
line no. 32 (after first bracket): key++
line no. 33: while(key<=3)
+ 1
but why do you want it to be with do while?
+ 1
//loops 3 times
//after 3rd wrong attempt program exits
//loop works atleast one time
//you asked for syntax, consider this as a pseudo code
int key = 1;
string pass;
while(key <=3){
cout<<"enter pass"<<endl;
cin >> pass;
if(pass =="correct")
break;
else
cout<<"wrong pass"<<endl;
key++;
}
if(switch > 3) cout << "limit exceeded.\nTry again later"<<endl;
else
cout << "You found the correct pass" << endl;
+ 1
thnxzzz â âââSreejithÂ
0
Helga so whats other apparopriate method of using this
as i want to do with do while because do while give us a result once even if the condition is false
so if the user wwrite wrong choice it wll ask it for again n again........so plz help me...........in doing this program
0
â âââSreejith can u give the syntax with java n also with do while loop!!!!!
if u confused about my question then plzzz check it my this code
https://code.sololearn.com/cm50EveDaMFx/?ref=app
I have only problem with that if the user give 3 times wrong password then the progam exit........